From 4eac85fc79a82595ac34acbdcb395d946847d2c7 Mon Sep 17 00:00:00 2001 From: bendevnull Date: Fri, 2 Aug 2024 02:06:08 -0500 Subject: [PATCH 01/17] Update lint.yml --- .github/workflows/lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 38be91f..321b759 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -25,7 +25,7 @@ jobs: - name: Setup Node uses: actions/setup-node@v2 with: - node-version: "16" + node-version: "20.16.0" - name: Install dependencies run: npm ci From c19ea7aaa2b061a1adb9e95b305894768285e732 Mon Sep 17 00:00:00 2001 From: Matthew Date: Fri, 2 Aug 2024 23:08:39 -0400 Subject: [PATCH 02/17] fix: Remove playlog temporarily --- src/pages/user/[username]/index.jsx | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/src/pages/user/[username]/index.jsx b/src/pages/user/[username]/index.jsx index 6c1d748..79589de 100644 --- a/src/pages/user/[username]/index.jsx +++ b/src/pages/user/[username]/index.jsx @@ -43,18 +43,6 @@ export const getServerSideProps = withSession(async ({ req, query }) => { isPublic: true, publicOverride: true, banned_user: true, - playlog: { - select: { - game: true, - play_time: true, - play_count: true, - played_on: true - }, - orderBy: { - played_on: 'desc' - }, - distinct: ['game_pk'] - }, game_sessions: { select: { game: true, @@ -100,7 +88,6 @@ export const getServerSideProps = withSession(async ({ req, query }) => { language: loggedInUser?.language || 'en', banReason: JSON.parse(safeJsonStringify(user.banned_user)), event: JSON.parse(safeJsonStringify(event)), - playlog: JSON.parse(safeJsonStringify(user.playlog)), session: JSON.parse(safeJsonStringify(user.game_sessions)) } } @@ -145,7 +132,6 @@ function ProfilePage ({ user, isLoggedIn, banReason, loggedInUser, event, playlo /> - : ''} From bd325533f6d61ebec5a162fa6f648e66bace65f3 Mon Sep 17 00:00:00 2001 From: bendevnull Date: Sat, 3 Aug 2024 03:32:11 +0000 Subject: [PATCH 03/17] fix: Holy fuck this is bad --- src/lib/riitag/neo/std/Covers.ts | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/src/lib/riitag/neo/std/Covers.ts b/src/lib/riitag/neo/std/Covers.ts index 5cd21cf..532168c 100644 --- a/src/lib/riitag/neo/std/Covers.ts +++ b/src/lib/riitag/neo/std/Covers.ts @@ -199,6 +199,7 @@ export default class Covers extends ModuleBase { } }, select: { + playlog_id: true, game: { select: { game_id: true, @@ -218,6 +219,30 @@ export default class Covers extends ModuleBase { return [] } + await prisma.playlog.deleteMany({ + where: { + game: { + console: CONSOLE.THREEDS + } + } + }) + + await prisma.playlog.deleteMany({ + where: { + game: null + } + }) + + for (const entry of playlog) { + if (!entry.game || entry.game.console == CONSOLE.THREEDS || entry.game.console == CONSOLE.SWITCH) { + await prisma.playlog.delete({ + where: { + playlog_id: entry.playlog_id + } + }) + } + } + const coverPaths = [] for (const logEntry of playlog) { From fd1d38269fe7d85947dc4dddba5f697d666e4225 Mon Sep 17 00:00:00 2001 From: bendevnull Date: Sat, 3 Aug 2024 03:34:13 +0000 Subject: [PATCH 04/17] fix: Linting sucks --- src/lib/riitag/neo/std/Covers.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lib/riitag/neo/std/Covers.ts b/src/lib/riitag/neo/std/Covers.ts index 532168c..20cd8a3 100644 --- a/src/lib/riitag/neo/std/Covers.ts +++ b/src/lib/riitag/neo/std/Covers.ts @@ -226,7 +226,7 @@ export default class Covers extends ModuleBase { } } }) - + await prisma.playlog.deleteMany({ where: { game: null @@ -234,12 +234,12 @@ export default class Covers extends ModuleBase { }) for (const entry of playlog) { - if (!entry.game || entry.game.console == CONSOLE.THREEDS || entry.game.console == CONSOLE.SWITCH) { - await prisma.playlog.delete({ + if (!entry.game || entry.game.console === CONSOLE.THREEDS || entry.game.console === CONSOLE.SWITCH) { + await prisma.playlog.delete({ where: { playlog_id: entry.playlog_id } - }) + }) } } From c2f4cfff40fdc34fe96bf0e6704665feb7c87239 Mon Sep 17 00:00:00 2001 From: bendevnull Date: Sat, 3 Aug 2024 03:47:20 +0000 Subject: [PATCH 05/17] fix: welp --- src/lib/riitag/neo/std/Covers.ts | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/lib/riitag/neo/std/Covers.ts b/src/lib/riitag/neo/std/Covers.ts index 20cd8a3..27e9e7c 100644 --- a/src/lib/riitag/neo/std/Covers.ts +++ b/src/lib/riitag/neo/std/Covers.ts @@ -192,6 +192,20 @@ export default class Covers extends ModuleBase { * @returns */ async getAllUserCovers (user: user): Promise { + await prisma.playlog.deleteMany({ + where: { + game: { + console: CONSOLE.THREEDS + } + } + }) + + await prisma.playlog.deleteMany({ + where: { + game: null + } + }) + const playlog = await prisma.playlog.findMany({ where: { user: { @@ -219,20 +233,6 @@ export default class Covers extends ModuleBase { return [] } - await prisma.playlog.deleteMany({ - where: { - game: { - console: CONSOLE.THREEDS - } - } - }) - - await prisma.playlog.deleteMany({ - where: { - game: null - } - }) - for (const entry of playlog) { if (!entry.game || entry.game.console === CONSOLE.THREEDS || entry.game.console === CONSOLE.SWITCH) { await prisma.playlog.delete({ From eaa7d91e37332f6b32894b312a9fd5736a3a58c2 Mon Sep 17 00:00:00 2001 From: bendevnull Date: Sat, 3 Aug 2024 03:52:42 +0000 Subject: [PATCH 06/17] fix: it has to be undefined, I see --- src/lib/riitag/neo/std/Covers.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/riitag/neo/std/Covers.ts b/src/lib/riitag/neo/std/Covers.ts index 27e9e7c..b78ad1f 100644 --- a/src/lib/riitag/neo/std/Covers.ts +++ b/src/lib/riitag/neo/std/Covers.ts @@ -202,7 +202,7 @@ export default class Covers extends ModuleBase { await prisma.playlog.deleteMany({ where: { - game: null + game: undefined } }) From cf3d6258385942271cb135ee0cf5543a23cd5392 Mon Sep 17 00:00:00 2001 From: bendevnull Date: Sat, 3 Aug 2024 03:53:11 +0000 Subject: [PATCH 07/17] fix: scratch that; nothing works --- src/lib/riitag/neo/std/Covers.ts | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/src/lib/riitag/neo/std/Covers.ts b/src/lib/riitag/neo/std/Covers.ts index b78ad1f..a360c7d 100644 --- a/src/lib/riitag/neo/std/Covers.ts +++ b/src/lib/riitag/neo/std/Covers.ts @@ -192,20 +192,6 @@ export default class Covers extends ModuleBase { * @returns */ async getAllUserCovers (user: user): Promise { - await prisma.playlog.deleteMany({ - where: { - game: { - console: CONSOLE.THREEDS - } - } - }) - - await prisma.playlog.deleteMany({ - where: { - game: undefined - } - }) - const playlog = await prisma.playlog.findMany({ where: { user: { From d4bf6308ffd1ce8598d5e630ce0c9d1b9957e6d9 Mon Sep 17 00:00:00 2001 From: bendevnull Date: Sat, 3 Aug 2024 04:01:16 +0000 Subject: [PATCH 08/17] fix: another band aid --- src/lib/riitag/neo/std/Covers.ts | 41 ++++++++++++++++++++++++-------- 1 file changed, 31 insertions(+), 10 deletions(-) diff --git a/src/lib/riitag/neo/std/Covers.ts b/src/lib/riitag/neo/std/Covers.ts index a360c7d..4ab3d35 100644 --- a/src/lib/riitag/neo/std/Covers.ts +++ b/src/lib/riitag/neo/std/Covers.ts @@ -199,13 +199,8 @@ export default class Covers extends ModuleBase { } }, select: { - playlog_id: true, - game: { - select: { - game_id: true, - console: true - } - } + game_pk: true, + playlog_id: true }, orderBy: { played_on: 'desc' @@ -220,18 +215,44 @@ export default class Covers extends ModuleBase { } for (const entry of playlog) { - if (!entry.game || entry.game.console === CONSOLE.THREEDS || entry.game.console === CONSOLE.SWITCH) { + const doesntmatter = await prisma.game.findFirst({ + where: { + game_pk: entry.game_pk + } + }) + if (!doesntmatter || doesntmatter.console === CONSOLE.THREEDS) { await prisma.playlog.delete({ where: { - playlog_id: entry.playlog_id + playlog_id: entry.playlog_id } }) } } + const otherPlaylog = await prisma.playlog.findMany({ + where: { + user: { + id: user.id + } + }, + select: { + game: { + select: { + console: true, + game_id: true + } + } + }, + orderBy: { + played_on: 'desc' + }, + distinct: ['game_pk'], + take: this.max + }) + const coverPaths = [] - for (const logEntry of playlog) { + for (const logEntry of otherPlaylog) { coverPaths.push(this.getCover( logEntry.game.console, user.cover_type, From d353125d1299dc8f06c5d996b114d4187d488323 Mon Sep 17 00:00:00 2001 From: Matthew Date: Sat, 3 Aug 2024 00:25:59 -0400 Subject: [PATCH 09/17] fix: Apply fix code --- src/lib/riitag/neo/std/Covers.ts | 76 ++++++++++++++++---------------- 1 file changed, 37 insertions(+), 39 deletions(-) diff --git a/src/lib/riitag/neo/std/Covers.ts b/src/lib/riitag/neo/std/Covers.ts index 4ab3d35..19e3cdc 100644 --- a/src/lib/riitag/neo/std/Covers.ts +++ b/src/lib/riitag/neo/std/Covers.ts @@ -11,6 +11,16 @@ import { user } from '@prisma/client' const xml2js = require('xml2js') +const pg = require('pg'); +const { Client } = pg +const client = new Client({ + host: 'localhost', + user: 'postgres', + password: 'postgres', + database: 'riitag', + port: 2345 +}) + export default class Covers extends ModuleBase { x: number y: number @@ -186,12 +196,32 @@ export default class Covers extends ModuleBase { return cover } + async fix (userId: number) { + await client.connect() + const res = await client.query('SELECT * FROM playlog WHERE user_id=$1', [userId]) + console.log(res.rows) // Hello world! + + for (const row of res.rows) { + console.log(row) + + const res = await client.query('SELECT * FROM game WHERE game_pk=$1', [row.game_pk]) + if (res.rows.length === 0) { + console.log('No game found for game_pk', row.game_pk) + await client.query('DELETE FROM playlog WHERE game_pk=$1', [row.game_pk]) + } + console.log(res.rows) + } + + await client.end() + } + /** * Get all of the covers for a user. * @param user The user to get the covers for. * @returns */ async getAllUserCovers (user: user): Promise { + await this.fix(user.id) const playlog = await prisma.playlog.findMany({ where: { user: { @@ -199,8 +229,12 @@ export default class Covers extends ModuleBase { } }, select: { - game_pk: true, - playlog_id: true + game: { + select: { + game_id: true, + console: true + } + } }, orderBy: { played_on: 'desc' @@ -214,45 +248,9 @@ export default class Covers extends ModuleBase { return [] } - for (const entry of playlog) { - const doesntmatter = await prisma.game.findFirst({ - where: { - game_pk: entry.game_pk - } - }) - if (!doesntmatter || doesntmatter.console === CONSOLE.THREEDS) { - await prisma.playlog.delete({ - where: { - playlog_id: entry.playlog_id - } - }) - } - } - - const otherPlaylog = await prisma.playlog.findMany({ - where: { - user: { - id: user.id - } - }, - select: { - game: { - select: { - console: true, - game_id: true - } - } - }, - orderBy: { - played_on: 'desc' - }, - distinct: ['game_pk'], - take: this.max - }) - const coverPaths = [] - for (const logEntry of otherPlaylog) { + for (const logEntry of playlog) { coverPaths.push(this.getCover( logEntry.game.console, user.cover_type, From af84549ed8096b22f95272b4b2a4e28cc6a558c6 Mon Sep 17 00:00:00 2001 From: Matthew Date: Sat, 3 Aug 2024 00:32:48 -0400 Subject: [PATCH 10/17] fixes? --- src/pages/user/[username]/index.jsx | 46 +++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/src/pages/user/[username]/index.jsx b/src/pages/user/[username]/index.jsx index 79589de..eb39381 100644 --- a/src/pages/user/[username]/index.jsx +++ b/src/pages/user/[username]/index.jsx @@ -20,6 +20,38 @@ export const getServerSideProps = withSession(async ({ req, query }) => { // Get the logged in user. This can be null. const session = req.session?.username + const pg = require('pg') + const { Client } = pg + const client = new Client({ + host: 'localhost', + user: 'postgres', + password: 'postgres', + database: 'riitag', + port: 2345 + }) + + const fix = async (username) => { + await client.connect() + const userId = await client.query('SELECT * FROM user WHERE username=$1', [username.toString()]) + const res = await client.query('SELECT * FROM playlog WHERE user_id=$1', [userId.rows[0].id]) + console.log(res.rows) // Hello world! + + for (const row of res.rows) { + console.log(row) + + const res = await client.query('SELECT * FROM game WHERE game_pk=$1', [row.game_pk]) + if (res.rows.length === 0) { + console.log('No game found for game_pk', row.game_pk) + await client.query('DELETE FROM playlog WHERE game_pk=$1', [row.game_pk]) + } + console.log(res.rows) + } + + await client.end() + } + + await fix(username) + // get user and ban reason const user = await prisma.user.findUnique({ where: { @@ -43,6 +75,18 @@ export const getServerSideProps = withSession(async ({ req, query }) => { isPublic: true, publicOverride: true, banned_user: true, + playlog: { + select: { + game: true, + play_time: true, + play_count: true, + played_on: true + }, + orderBy: { + played_on: 'desc' + }, + distinct: ['game_pk'] + }, game_sessions: { select: { game: true, @@ -88,6 +132,7 @@ export const getServerSideProps = withSession(async ({ req, query }) => { language: loggedInUser?.language || 'en', banReason: JSON.parse(safeJsonStringify(user.banned_user)), event: JSON.parse(safeJsonStringify(event)), + playlog: JSON.parse(safeJsonStringify(user.playlog)), session: JSON.parse(safeJsonStringify(user.game_sessions)) } } @@ -132,6 +177,7 @@ function ProfilePage ({ user, isLoggedIn, banReason, loggedInUser, event, playlo /> + : ''} From edfb05ab4cb4788c38b08ce099f82bde276b76f3 Mon Sep 17 00:00:00 2001 From: Matthew Date: Sat, 3 Aug 2024 00:36:09 -0400 Subject: [PATCH 11/17] fix? --- src/pages/user/[username]/index.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/user/[username]/index.jsx b/src/pages/user/[username]/index.jsx index eb39381..2526796 100644 --- a/src/pages/user/[username]/index.jsx +++ b/src/pages/user/[username]/index.jsx @@ -32,7 +32,7 @@ export const getServerSideProps = withSession(async ({ req, query }) => { const fix = async (username) => { await client.connect() - const userId = await client.query('SELECT * FROM user WHERE username=$1', [username.toString()]) + const userId = await client.query('SELECT * FROM public.user WHERE username=$1', [username.toString()]) const res = await client.query('SELECT * FROM playlog WHERE user_id=$1', [userId.rows[0].id]) console.log(res.rows) // Hello world! From 1fabe6b82617e5eb86f5f1e79edcb1f87b789219 Mon Sep 17 00:00:00 2001 From: Matthew Date: Sat, 3 Aug 2024 16:11:28 -0400 Subject: [PATCH 12/17] fix: Readd missing coin --- public/img/coin/mariogalaxy.png | Bin 0 -> 15074 bytes src/lib/constants/forms/coins.js | 4 ++++ 2 files changed, 4 insertions(+) create mode 100644 public/img/coin/mariogalaxy.png diff --git a/public/img/coin/mariogalaxy.png b/public/img/coin/mariogalaxy.png new file mode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xFOTC@#t%elIG;V?_-Mr<|is5`RdUZevL_$hp$esoj3^0ILW zrC)IRng8uTw}gQ*t?K=9RQ5Mw34F9^V_^4eew$tBK`O(`ZErpafuZxC;ARz)Li29r z-FDgxHBv@mX^!8w&7mH%NJ#0JXD{951GL5?Uv(qbph%_%U~IuougkRe8YK`@ua2e&Rla45l`KRPHA)e*HKGpr9uQr_mnQWf3a*6?v&U2*qQgt1=frUyh*-I z^hmDmsOdFOZJjTkbs`GStZVHVc-EA^>>|Z?(lc}SG~j$Z*Z-lEw(6kgH7f(N$kk7Z zmKC9Z@#>ul^u6b)Nb$^c_r4N8HID)%m~}iMTIO zycXMEZtGoXwa!z#zuUQ#Op*9rL1zecfT*;-U!&fa;JJvn!(eqy?-;^eF&=YqYdnMd zbj~=*L^+BY?vI|VZWj1L9E_zFM!u09CB5G5nUa{$dfv9UabkTW_jsb2Z$?WNSMVQ~ d?zmrcsObCQpDvlY literal 0 HcmV?d00001 diff --git a/src/lib/constants/forms/coins.js b/src/lib/constants/forms/coins.js index 314e87b..fdd5ede 100644 --- a/src/lib/constants/forms/coins.js +++ b/src/lib/constants/forms/coins.js @@ -62,6 +62,10 @@ export const COINS = Object.freeze([ { value: 'rhythmheaven', label: 'Rhythm Heaven (DS) Tutorial Coin' + }, + { + value: 'mariogalaxy', + label: 'Mario Galaxy Star Bit' } ]) From a61bdab57a23474f4365df817c79d8372ddbccee Mon Sep 17 00:00:00 2001 From: Matthew Date: Sat, 3 Aug 2024 17:01:59 -0400 Subject: [PATCH 13/17] fix: Moderator language settings --- src/pages/api/account/language.js | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/pages/api/account/language.js b/src/pages/api/account/language.js index d7afae8..78c6be3 100644 --- a/src/pages/api/account/language.js +++ b/src/pages/api/account/language.js @@ -25,12 +25,6 @@ async function exportData (request, response) { .json({ error: 'Unauthorized' }) } - if (!(await userIsMod(loggedInUser))) { - return response - .status(HTTP_CODE.UNAUTHORIZED) - .json({ error: 'Unauthorized' }) - } - try { await prisma.user.update({ data: { From 2346bb4b5932a56c8d09640b6a21704ec52b426f Mon Sep 17 00:00:00 2001 From: Matthew Date: Sat, 3 Aug 2024 17:02:52 -0400 Subject: [PATCH 14/17] refactor: Remove unused imports --- src/pages/api/account/language.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/pages/api/account/language.js b/src/pages/api/account/language.js index 78c6be3..a4eea3d 100644 --- a/src/pages/api/account/language.js +++ b/src/pages/api/account/language.js @@ -1,6 +1,5 @@ import HTTP_CODE from '@/lib/constants/httpStatusCodes' import { ncWithSession } from '@/lib/routing' -import { userIsMod } from '@/lib/utils/databaseUtils' import prisma from '@/lib/db' import logger from '@/lib/logger' import { isBlank } from '@/lib/utils/utils' From 046656297734a874551afdaf77bc424395edb375 Mon Sep 17 00:00:00 2001 From: Matthew Date: Sun, 4 Aug 2024 13:49:13 -0400 Subject: [PATCH 15/17] fix: Doubled up --- package-lock.json | 125 +++++++++++++++++++++++++++++++ package.json | 1 + public/img/flag/flag_ct.png | Bin 0 -> 879 bytes src/lib/constants/forms/flags.js | 4 + src/lib/riitag/neo/std/Covers.ts | 8 +- 5 files changed, 131 insertions(+), 7 deletions(-) create mode 100644 public/img/flag/flag_ct.png diff --git a/package-lock.json b/package-lock.json index 5f0c355..3563d4b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -33,6 +33,7 @@ "next-connect": "0.13.0", "next-seo": "5.15.0", "nextjs-progressbar": "0.0.16", + "pg": "^8.12.0", "pino": "8.8.0", "pino-pretty": "^10.3.1", "prop-types": "15.8.1", @@ -4981,6 +4982,87 @@ "node": ">=8" } }, + "node_modules/pg": { + "version": "8.12.0", + "resolved": "https://registry.npmjs.org/pg/-/pg-8.12.0.tgz", + "integrity": "sha512-A+LHUSnwnxrnL/tZ+OLfqR1SxLN3c/pgDztZ47Rpbsd4jUytsTtwQo/TLPRzPJMp/1pbhYVhH9cuSZLAajNfjQ==", + "dependencies": { + "pg-connection-string": "^2.6.4", + "pg-pool": "^3.6.2", + "pg-protocol": "^1.6.1", + "pg-types": "^2.1.0", + "pgpass": "1.x" + }, + "engines": { + "node": ">= 8.0.0" + }, + "optionalDependencies": { + "pg-cloudflare": "^1.1.1" + }, + "peerDependencies": { + "pg-native": ">=3.0.1" + }, + "peerDependenciesMeta": { + "pg-native": { + "optional": true + } + } + }, + "node_modules/pg-cloudflare": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/pg-cloudflare/-/pg-cloudflare-1.1.1.tgz", + "integrity": "sha512-xWPagP/4B6BgFO+EKz3JONXv3YDgvkbVrGw2mTo3D6tVDQRh1e7cqVGvyR3BE+eQgAvx1XhW/iEASj4/jCWl3Q==", + "optional": true + }, + "node_modules/pg-connection-string": { + "version": "2.6.4", + "resolved": "https://registry.npmjs.org/pg-connection-string/-/pg-connection-string-2.6.4.tgz", + "integrity": "sha512-v+Z7W/0EO707aNMaAEfiGnGL9sxxumwLl2fJvCQtMn9Fxsg+lPpPkdcyBSv/KFgpGdYkMfn+EI1Or2EHjpgLCA==" + }, + "node_modules/pg-int8": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/pg-int8/-/pg-int8-1.0.1.tgz", + "integrity": "sha512-WCtabS6t3c8SkpDBUlb1kjOs7l66xsGdKpIPZsg4wR+B3+u9UAum2odSsF9tnvxg80h4ZxLWMy4pRjOsFIqQpw==", + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/pg-pool": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/pg-pool/-/pg-pool-3.6.2.tgz", + "integrity": "sha512-Htjbg8BlwXqSBQ9V8Vjtc+vzf/6fVUuak/3/XXKA9oxZprwW3IMDQTGHP+KDmVL7rtd+R1QjbnCFPuTHm3G4hg==", + "peerDependencies": { + "pg": ">=8.0" + } + }, + "node_modules/pg-protocol": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/pg-protocol/-/pg-protocol-1.6.1.tgz", + "integrity": "sha512-jPIlvgoD63hrEuihvIg+tJhoGjUsLPn6poJY9N5CnlPd91c2T18T/9zBtLxZSb1EhYxBRoZJtzScCaWlYLtktg==" + }, + "node_modules/pg-types": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/pg-types/-/pg-types-2.2.0.tgz", + "integrity": "sha512-qTAAlrEsl8s4OiEQY69wDvcMIdQN6wdz5ojQiOy6YRMuynxenON0O5oCpJI6lshc6scgAY8qvJ2On/p+CXY0GA==", + "dependencies": { + "pg-int8": "1.0.1", + "postgres-array": "~2.0.0", + "postgres-bytea": "~1.0.0", + "postgres-date": "~1.0.4", + "postgres-interval": "^1.1.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/pgpass": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/pgpass/-/pgpass-1.0.5.tgz", + "integrity": "sha512-FdW9r/jQZhSeohs1Z3sI1yxFQNFvMcnmfuj4WBMUTxOrAyLMaTcE1aAMBiTlbMNaXvBCQuVi0R7hd8udDSP7ug==", + "dependencies": { + "split2": "^4.1.0" + } + }, "node_modules/picocolors": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz", @@ -5123,6 +5205,41 @@ "node": "^10 || ^12 || >=14" } }, + "node_modules/postgres-array": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/postgres-array/-/postgres-array-2.0.0.tgz", + "integrity": "sha512-VpZrUqU5A69eQyW2c5CA1jtLecCsN2U/bD6VilrFDWq5+5UIEVO7nazS3TEcHf1zuPYO/sqGvUvW62g86RXZuA==", + "engines": { + "node": ">=4" + } + }, + "node_modules/postgres-bytea": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/postgres-bytea/-/postgres-bytea-1.0.0.tgz", + "integrity": "sha512-xy3pmLuQqRBZBXDULy7KbaitYqLcmxigw14Q5sj8QBVLqEwXfeybIKVWiqAXTlcvdvb0+xkOtDbfQMOf4lST1w==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/postgres-date": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/postgres-date/-/postgres-date-1.0.7.tgz", + "integrity": "sha512-suDmjLVQg78nMK2UZ454hAG+OAW+HQPZ6n++TNDUX+L0+uUlLywnoxJKDou51Zm+zTCjrCl0Nq6J9C5hP9vK/Q==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/postgres-interval": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/postgres-interval/-/postgres-interval-1.2.0.tgz", + "integrity": "sha512-9ZhXKM/rw350N1ovuWHbGxnGh/SNJ4cnxHiM0rxE4VN41wsg8P8zWn9hv/buK00RP4WvlOyr/RBDiptyxVbkZQ==", + "dependencies": { + "xtend": "^4.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/prelude-ls": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", @@ -6757,6 +6874,14 @@ "node": ">=4.0" } }, + "node_modules/xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", + "engines": { + "node": ">=0.4" + } + }, "node_modules/yallist": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", diff --git a/package.json b/package.json index 50d0cc5..69e641a 100644 --- a/package.json +++ b/package.json @@ -57,6 +57,7 @@ "next-connect": "0.13.0", "next-seo": "5.15.0", "nextjs-progressbar": "0.0.16", + "pg": "^8.12.0", "pino": "8.8.0", "pino-pretty": "^10.3.1", "prop-types": "15.8.1", diff --git a/public/img/flag/flag_ct.png b/public/img/flag/flag_ct.png new file mode 100644 index 0000000000000000000000000000000000000000..d0271d2b49073a057bd072a7cd53760840ccc72d GIT binary patch literal 879 zcmeAS@N?(olHy`uVBq!ia0vp^4L}^r!3HFA=jB-eDaPU;cPEB*=VV?2IV|apzK#qG z8~eHcB(eheoCO|{#S9F5hd`K7RKu%*fr06jr;B4qMcmt4*8U=i5=RT;?i{N&IV2Uu zwe-l*K9_BRNlgcTF#3E+ZV>$~n6tNr*&}B|ptP0V)W!v3$4;y@Vsn0Y?5mCO;awaz zBM!~^uWz~Mz2A#@htIq*Soz%E#D2c)HKV0HTIN&hmM(hmBtvWWsa=~^oC#<99=@gQ z>Q)A+Kg_!RQ#Ba;=7*++xz0FkFISqwX!3(m_x#k(Hw=EeS)X=xZJ1gA=d}l;$sa-8 z^;2KpWSnwzo6$-kou~4}?OY2U-oN%KZ07`7hnsISzn&A?!W}T@+jP-?pHAzZW7*n# z+A;r+#-0#~x}QgT;-B1J#BlWPzq>aMAF43?{7o`pS;Rx-*_A=USyB9VB@Z3*_*J!j zec`jD>|GWN%KN_uDd)z>RxJM;QOA*X@3`%OfPL)?7iu_|-aj0$^|K`dPas3F$N?Ev z19!$VK<3NahxdhTY+v{zo`Kcim?}a7NzKZio$QY1E**abR3fI|8pM!%hk3?ghG!ZL zmRt#aOmL=NZGG8HcE@8Cnpb3|qu2s7Y^nTuy^jhfB;K>kdMt#j6=urLErqQhyVmnR z*Jv<|<1#&Ni)IN#<)v$jvu!wxj(IP9wu1%k0EpZo2J4?kV(8gYx6EyiaKz<0O?wt&WzD)(ET^OLj>?&ZX*K`e+MLhWo7CE$^X#Ui!V8@Z z3sP@MCbaq77VZUZIaxD9zHMUGSUltH-=u3Z&lx*R zQP{_OMf4oYQ(@z^;>LN_Aq@e4oN7#as+p!ZpV{>7{RijYY9B0i8P2(6wAe+l;MW?h z%~F42{(W4rj@4p;5>Ixg5iqq)SrrsmP-HSSHZ?XfHujqptK^<~fkvN?bl1TF Date: Sun, 4 Aug 2024 13:54:11 -0400 Subject: [PATCH 16/17] fix: Covers --- src/lib/riitag/neo/std/Covers.ts | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/src/lib/riitag/neo/std/Covers.ts b/src/lib/riitag/neo/std/Covers.ts index 6f9e897..e3d1e6a 100644 --- a/src/lib/riitag/neo/std/Covers.ts +++ b/src/lib/riitag/neo/std/Covers.ts @@ -196,26 +196,12 @@ export default class Covers extends ModuleBase { return cover } - async fix (userId: number) { - const res = await client.query('SELECT * FROM playlog WHERE user_id=$1', [userId]) - console.log(res.rows) // Hello world! - - for (const row of res.rows) { - const res = await client.query('SELECT * FROM game WHERE game_pk=$1', [row.game_pk]) - if (res.rows.length === 0) { - console.log('No game found for game_pk', row.game_pk) - await client.query('DELETE FROM playlog WHERE game_pk=$1', [row.game_pk]) - } - } - } - /** * Get all of the covers for a user. * @param user The user to get the covers for. * @returns */ async getAllUserCovers (user: user): Promise { - await this.fix(user.id) const playlog = await prisma.playlog.findMany({ where: { user: { From 0cd6ecceab1dc12a234e3a976d698cee770b2248 Mon Sep 17 00:00:00 2001 From: Matthew Date: Sun, 4 Aug 2024 13:54:32 -0400 Subject: [PATCH 17/17] fix: Package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 69e641a..de37c44 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ "dev:db-validate": "dotenv -e .env.development.local prisma validate", "prod:migrate": "dotenv -e .env.production.local prisma migrate deploy", "prod:build": "next build", - "prod:start": "next start", + "prod:start": "next start --port 42069", "global:check-dependencies": "npm-check --skip-unused" }, "devDependencies": {