feat: upgrade to TypeORM 0.3

This commit is contained in:
Dragory 2023-07-01 12:17:45 +00:00
parent 8cee4ec1e4
commit 761ff27771
No known key found for this signature in database
57 changed files with 412 additions and 325 deletions

View file

@ -1,7 +1,8 @@
import moment from "moment-timezone";
import { getRepository, Repository } from "typeorm";
import { Repository } from "typeorm";
import { DBDateFormat } from "../utils";
import { BaseRepository } from "./BaseRepository";
import { dataSource } from "./dataSource";
import { Tempban } from "./entities/Tempban";
export class Tempbans extends BaseRepository {
@ -9,7 +10,7 @@ export class Tempbans extends BaseRepository {
constructor() {
super();
this.tempbans = getRepository(Tempban);
this.tempbans = dataSource.getRepository(Tempban);
}
getSoonExpiringTempbans(threshold: number): Promise<Tempban[]> {