Compare commits

..

No commits in common. "b07d0097d3f98931d5629f3a7f46ef37509d73dd" and "19cdfcc5bc13eb897d20edbe9b0e75b10f0afea4" have entirely different histories.

7 changed files with 7 additions and 16 deletions

View file

@ -26,11 +26,7 @@
**/values.dev.yaml
**/build
**/dist
LICENSE
README.md
data/main_db.json
data/test_db.json
stack.env
public/css/*.css
public/courses/*.txt
LICENSE
README.md

3
.gitignore vendored
View file

@ -1,9 +1,8 @@
# Custom
stack.env
public/css/*
public/courses/*
data/*
!data/main_db.example.json
!data/main_db.json
# Logs
logs

View file

@ -51,8 +51,6 @@ COPY . .
RUN pnpm run build
# This project specific
RUN mv stack.env.example stack.env
RUN mv data/main_db.example.json data/main_db.json
RUN chmod -R 777 data/
RUN chmod -R 777 public/
# End

View file

@ -1,6 +1,4 @@
require("dotenv").config({
path: "stack.env",
});
require("dotenv").config();
module.exports = {
/* Set true for production database */
@ -19,4 +17,4 @@ module.exports = {
cookieSecret: process.env.COOKIE || "",
/* Discord webhook url or leave empty */
webhook_url: process.env.WEBHOOK || "",
};
};

View file

@ -21,10 +21,10 @@ router.get("/", async (req, res) => {
/* Pages Count */
const coursesCount = Object.keys(courses).length;
const pagesCount = Math.max(Math.ceil(coursesCount / 20), 0);
if (page === "Page") page = 1;
if (page * 20 - coursesCount >= 20) page = 1;
/* Pages Dropdown */
let pagesDropdown = "";
for (let i = 1; i <= pagesCount; i++) {
@ -118,7 +118,7 @@ router.get("/", async (req, res) => {
plays: "DESC",
};
if (sortType === "none" || sortType === "Sort by")
if (sortType === "none" || sortType === "Sort")
sortedCodesData = codesData.sort((a, b) => {
return b.time - a.time;
});