Update Admin entity and AdminService to use user_id instead of id

This commit is contained in:
Errormacr
2023-11-20 14:59:51 +03:00
parent c53b37590a
commit 35e72a2134
2 changed files with 12 additions and 4 deletions

View File

@@ -21,7 +21,7 @@ export class AdminService {
try {
this.logger.debug(`[admin.checkIsAdmin]`);
const admins = await this.adminRepository.findOne({
where: { id: id },
where: { user_id: id },
});
if (!admins) {
return false;