mirror of
https://github.com/spacebarchat/server.git
synced 2026-05-20 04:25:26 +00:00
properly mark unused params
This commit is contained in:
+1
-1
@@ -114,7 +114,7 @@ export class UrlSignResult {
|
||||
}
|
||||
|
||||
export const getUrlSignature = (data: NewUrlSignatureData): UrlSignResult => {
|
||||
const { cdnSignatureKey, cdnSignatureDuration } = Config.get().security;
|
||||
const { cdnSignatureDuration } = Config.get().security;
|
||||
|
||||
// calculate the expiration time
|
||||
const now = Date.now();
|
||||
|
||||
@@ -99,7 +99,7 @@ export class UserSettingsProtos extends BaseClassWithoutId {
|
||||
}
|
||||
|
||||
static async getOrDefault(user_id: string, save: boolean = false): Promise<UserSettingsProtos> {
|
||||
const user = await User.findOneOrFail({
|
||||
await User.findOneOrFail({
|
||||
where: { id: user_id },
|
||||
select: { settings: true },
|
||||
});
|
||||
|
||||
@@ -719,7 +719,7 @@ export class initial0 implements MigrationInterface {
|
||||
await queryRunner.query(`ALTER TABLE ONLY public.team_members ADD CONSTRAINT "FK_fdad7d5768277e60c40e01cdcea" FOREIGN KEY (team_id) REFERENCES public.teams(id) ON DELETE CASCADE;`);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
public async down(_: QueryRunner): Promise<void> {
|
||||
throw new Error("Can't revert this: just throw away your database lol");
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -6,5 +6,5 @@ export class DeleteBotUsersWithoutAnApplication1761113394664 implements Migratio
|
||||
await queryRunner.query(`DELETE FROM users WHERE bot = true AND id NOT IN (SELECT bot_user_id FROM applications);`);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {}
|
||||
public async down(_: QueryRunner): Promise<void> {}
|
||||
}
|
||||
|
||||
@@ -59,7 +59,8 @@ if (!isHeadlessProcess) {
|
||||
);
|
||||
console.log(`[Database] ${red(`If you would like to try *anyways*, see the error below:`)}`);
|
||||
try {
|
||||
const _ = require("sqlite3");
|
||||
// TODO: fully remove sqlite3
|
||||
require("sqlite3");
|
||||
} catch (e) {
|
||||
console.log(`[Database] ${red(`Failed to load sqlite3 package. Please install it with 'npm install --no-save sqlite3', or switch to a real database like Postgres.`)}`);
|
||||
process.exit(1);
|
||||
|
||||
@@ -33,6 +33,8 @@ export class BaseEmailClient implements IEmailClient {
|
||||
return;
|
||||
}
|
||||
sendMail(email: IEmail): Promise<void> {
|
||||
// noinspection JSUnusedLocalSymbols - parameter exists for public API reasons
|
||||
const _ = email;
|
||||
throw new Error("Method not implemented.");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,6 +23,7 @@ function getNextWorker(): Worker {
|
||||
return worker;
|
||||
}
|
||||
|
||||
// noinspection JSUnusedLocalSymbols - TODO: implement options
|
||||
export class JsonSerializer {
|
||||
public static Serialize<T>(value: T, opts?: JsonSerializerOptions): string {
|
||||
return JSON.stringify(value);
|
||||
|
||||
Reference in New Issue
Block a user