1
0
mirror of https://github.com/toast-ts/Daggerbot-TS.git synced 2024-11-17 12:21:00 -05:00

Remove unused functions in models directory

This commit is contained in:
AnxietyisReal 2023-12-27 19:43:57 +11:00
parent fcfd11431a
commit ef1b395352
2 changed files with 0 additions and 17 deletions

View File

@ -55,9 +55,6 @@ export class MPServerSvc {
}) })
this.model.sync(); this.model.sync();
} }
async getServers() {
return await this.model.findAll();
}
async fetchPlayerData(serverName:string) { async fetchPlayerData(serverName:string) {
const findServerByName = await this.model.findOne({where: {serverName: serverName}}); const findServerByName = await this.model.findOne({where: {serverName: serverName}});
if (findServerByName) return findServerByName.dataValues.playerData; if (findServerByName) return findServerByName.dataValues.playerData;
@ -118,14 +115,4 @@ export class MPServerSvc {
} }
return result; return result;
} }
async getServerData(serverName:string):Promise<IServer> {
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;
}
})
}
} }

View File

@ -38,10 +38,6 @@ export class DailyMsgsSvc {
return await this.model.findAll(); return await this.model.findAll();
// Fetch every rows from database. // 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) { async newDay(formattedDate:number, total:number) {
if (await this.model.findOne({where: {day: formattedDate}})) return console.log('This day already exists!') if (await this.model.findOne({where: {day: formattedDate}})) return console.log('This day already exists!')
return await this.model.create({day: formattedDate, total: total}); return await this.model.create({day: formattedDate, total: total});