Skip to content

Commit

Permalink
codium is complaining over smth
Browse files Browse the repository at this point in the history
  • Loading branch information
sky 3 committed Dec 24, 2024
1 parent f94b965 commit 96a4918
Show file tree
Hide file tree
Showing 25 changed files with 10 additions and 5 deletions.
Empty file modified .env.example
100644 → 100755
Empty file.
Empty file modified .gitignore
100644 → 100755
Empty file.
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"git.ignoreLimitWarning": true
}
Empty file modified LICENSE
100644 → 100755
Empty file.
Empty file modified account.js
100644 → 100755
Empty file.
Empty file modified ai.js
100644 → 100755
Empty file.
Empty file modified database.js
100644 → 100755
Empty file.
Empty file modified html/admin.html
100644 → 100755
Empty file.
Empty file modified html/ai.html
100644 → 100755
Empty file.
Empty file modified html/login.html
100644 → 100755
Empty file.
Empty file modified html/profile.html
100644 → 100755
Empty file.
Empty file modified html/profile_404.html
100644 → 100755
Empty file.
Empty file modified html/profile_ban.html
100644 → 100755
Empty file.
Empty file modified html/profile_edit.html
100644 → 100755
Empty file.
Empty file modified html/register.html
100644 → 100755
Empty file.
Empty file modified html/reset.html
100644 → 100755
Empty file.
Empty file modified html/stats.html
100644 → 100755
Empty file.
Empty file modified html/users.html
100644 → 100755
Empty file.
12 changes: 7 additions & 5 deletions index.js
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -152,14 +152,16 @@ app.get("/api/infinite/get", async (req, res, next) => {
let success = false;
let data;
try {
let search1Query = infdb.query(`SELECT * FROM caches WHERE first = $one AND second = $two`)
let search1 = await search1Query.all({ $one: req.query[1], $two: req.query[2] });
let search1Query = infdb.query(`SELECT * FROM caches WHERE 1 = $one AND 2 = $two`)
let search1 = await search1Query.get({ $one: req.query[1], $two: req.query[2] });
console.log(search1);
if (search1 && search1.length > 0) {
data = { item: search1[0].result_item, emoji: search1[0].result_emoji, new: false };
success = true;
} else {
let search2Query = infdb.query(`SELECT * FROM caches WHERE first = $two AND second = $one`)
let search2 = await search2Query.all({ $one: req.query[1], $two: req.query[2] });
let search2Query = infdb.query(`SELECT * FROM caches WHERE 1 = $two AND 2 = $one`)
let search2 = await search2Query.get({ $one: req.query[1], $two: req.query[2] });
console.log(search2);
if (search2 && search2.length > 0) {
data = { item: search2[0].result_item, emoji: search2[0].result_emoji, new: false };
success = true;
Expand All @@ -180,7 +182,7 @@ app.get("/api/infinite/get", async (req, res, next) => {
if (keys.indexOf("item") > -1 && keys.indexOf("emoji") > -1) {
parse.new = true;
data = parse;
const createCached = infdb.query(`INSERT INTO caches (first, second, result_item, result_emoji) VALUES ($one, $two, $item, $emoji)`)
const createCached = infdb.query(`INSERT INTO caches (1, 2, result_item, result_emoji) VALUES ($one, $two, $item, $emoji)`)
createCached.run({ $one: req.query[1], $two: req.query[2], $item: data.item, $emoji: data.emoji });
res.send(data);
}
Expand Down
Empty file modified log.js
100644 → 100755
Empty file.
Empty file modified package-lock.json
100644 → 100755
Empty file.
Empty file modified package.json
100644 → 100755
Empty file.
Empty file modified pm2.config.cjs
100644 → 100755
Empty file.
Empty file modified readme.md
100644 → 100755
Empty file.
Empty file modified svg-converter.js
100644 → 100755
Empty file.

0 comments on commit 96a4918

Please sign in to comment.