From f393a836a96f4de3c011a90e164fa32f67c4b709 Mon Sep 17 00:00:00 2001 From: toast-ts <96593068+toast-ts@users.noreply.github.com> Date: Wed, 27 Dec 2023 19:43:57 +1100 Subject: [PATCH] Remove unused functions in models directory --- src/models/MPServer.ts | 13 ------------- src/models/dailyMsgs.ts | 4 ---- 2 files changed, 17 deletions(-) diff --git a/src/models/MPServer.ts b/src/models/MPServer.ts index f61aeb5..cf57e0f 100644 --- a/src/models/MPServer.ts +++ b/src/models/MPServer.ts @@ -55,9 +55,6 @@ export class MPServerSvc { }) this.model.sync(); } - async getServers() { - return await this.model.findAll(); - } async fetchPlayerData(serverName:string) { const findServerByName = await this.model.findOne({where: {serverName: serverName}}); if (findServerByName) return findServerByName.dataValues.playerData; @@ -118,14 +115,4 @@ export class MPServerSvc { } return result; } - async getServerData(serverName:string):Promise { - return new Promise(async resolve=>{ - const serverInfo = await this.findInCache(); - - for (let i = 0; i < serverInfo.length; i++) { - if (serverInfo[i].serverName === serverName) resolve(serverInfo[i]); - break; - } - }) - } } diff --git a/src/models/dailyMsgs.ts b/src/models/dailyMsgs.ts index 712160f..05188d6 100644 --- a/src/models/dailyMsgs.ts +++ b/src/models/dailyMsgs.ts @@ -38,10 +38,6 @@ export class DailyMsgsSvc { return await this.model.findAll(); // Fetch every rows from database. } - async fetchSpecificDay(dayId:number) { - return await this.model.findOne({where: {day: dayId}}); - // Fetch a specific row from database by id column. - } async newDay(formattedDate:number, total:number) { if (await this.model.findOne({where: {day: formattedDate}})) return console.log('This day already exists!') return await this.model.create({day: formattedDate, total: total});