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});