修改数据库加载

This commit is contained in:
whyour
2021-11-08 22:47:46 +08:00
parent bd6d711212
commit 31fdf7f12c
9 changed files with 71 additions and 60 deletions
+3 -6
View File
@@ -15,22 +15,19 @@ import ScheduleService from './schedule';
import { spawn } from 'child_process';
import SockService from './sock';
import got from 'got';
import { dbs } from '../loaders/db';
@Service()
export default class UserService {
@Inject((type) => NotificationService)
private notificationService!: NotificationService;
private authDb = new DataStore({ filename: config.authDbFile });
private authDb = dbs.authDb;
constructor(
@Inject('logger') private logger: winston.Logger,
private scheduleService: ScheduleService,
private sockService: SockService,
) {
this.authDb.loadDatabase((err) => {
if (err) throw err;
});
}
) {}
public async login(
payloads: {