diff --git a/backend/package.json b/backend/package.json index ba826ce2e..2ff53482a 100644 --- a/backend/package.json +++ b/backend/package.json @@ -19,11 +19,11 @@ "watch-api": "cross-env NODE_ENV=development tsc-watch --onSuccess \"npm run start-api-dev\"", "typeorm": "node -r ./register-tsconfig-paths.js ./node_modules/typeorm/cli.js", "migrate": "npm run typeorm -- migration:run -d dist/backend/src/data/dataSource.js", - "migrate-prod": "npm run migrate", - "migrate-dev": "npm run build && npm run migrate", + "migrate-prod": "cross-env NODE_ENV=production npm run migrate", + "migrate-dev": "cross-env NODE_ENV=development npm run build && npm run migrate", "migrate-rollback": "npm run typeorm -- migration:revert -d dist/backend/src/data/dataSource.js", - "migrate-rollback-prod": "npm run migrate", - "migrate-rollback-dev": "npm run build && npm run migrate", + "migrate-rollback-prod": "cross-env NODE_ENV=production npm run migrate", + "migrate-rollback-dev": "cross-env NODE_ENV=development npm run build && npm run migrate", "test": "npm run build && npm run run-tests", "run-tests": "ava", "test-watch": "tsc-watch --onSuccess \"npx ava\"" diff --git a/backend/src/api/auth.ts b/backend/src/api/auth.ts index f44863568..85e42ecb4 100644 --- a/backend/src/api/auth.ts +++ b/backend/src/api/auth.ts @@ -149,7 +149,7 @@ export function initAuth(app: express.Express) { export function apiTokenAuthHandlers() { return [ - passport.authenticate("api-token", { failWithError: true }), + passport.authenticate("api-token", { failWithError: true, session: false }), // eslint-disable-next-line @typescript-eslint/no-unused-vars (err, req: Request, res: Response, next) => { return res.status(401).json({ error: err.message }); diff --git a/backend/src/plugins/Cases/caseIcons.ts b/backend/src/plugins/Cases/caseIcons.ts index 3c6858043..3d18cd128 100644 --- a/backend/src/plugins/Cases/caseIcons.ts +++ b/backend/src/plugins/Cases/caseIcons.ts @@ -1,13 +1,15 @@ import { CaseTypes } from "../../data/CaseTypes"; +// These emoji icons are hosted on the Hangar server +// If you'd like your self-hosted instance to use these icons, check #add-your-bot on that server export const caseIcons: Record = { - [CaseTypes.Ban]: "<:case_ban:742540201443721317>", - [CaseTypes.Unban]: "<:case_unban:742540201670475846>", - [CaseTypes.Note]: "<:case_note:742540201368485950>", - [CaseTypes.Warn]: "<:case_warn:742540201624338454>", - [CaseTypes.Kick]: "<:case_kick:742540201661825165>", - [CaseTypes.Mute]: "<:case_mute:742540201817145364>", - [CaseTypes.Unmute]: "<:case_unmute:742540201489858643>", - [CaseTypes.Deleted]: "<:case_deleted:742540201473343529>", - [CaseTypes.Softban]: "<:case_softban:742540201766813747>", + [CaseTypes.Ban]: "<:case_ban:906897178176393246>", + [CaseTypes.Unban]: "<:case_unban:906897177824067665>", + [CaseTypes.Note]: "<:case_note:906897177832476743>", + [CaseTypes.Warn]: "<:case_warn:906897177840844832>", + [CaseTypes.Kick]: "<:case_kick:906897178310639646>", + [CaseTypes.Mute]: "<:case_mute:906897178147057664>", + [CaseTypes.Unmute]: "<:case_unmute:906897177819881523>", + [CaseTypes.Deleted]: "<:case_deleted:906897178209968148>", + [CaseTypes.Softban]: "<:case_softban:906897177828278274>", }; diff --git a/backend/src/utils.ts b/backend/src/utils.ts index 566e07302..1bb4d6ce6 100644 --- a/backend/src/utils.ts +++ b/backend/src/utils.ts @@ -553,7 +553,7 @@ export function convertMSToDelayString(ms: number): string { return result; } -export function successMessage(str: string, emoji = "<:zep_check:650361014180904971>") { +export function successMessage(str: string, emoji = "<:zep_check:906897402101891093>") { return emoji ? `${emoji} ${str}` : str; }