Dashboard work and related

This commit is contained in:
Dragory 2019-06-23 19:18:41 +03:00
parent 7bda2b1763
commit b230a73a6f
44 changed files with 637 additions and 272 deletions

View file

@ -0,0 +1,21 @@
import { getRepository, Repository } from "typeorm";
import { ApiPermission } from "./entities/ApiPermission";
import { BaseRepository } from "./BaseRepository";
export class ApiPermissions extends BaseRepository {
private apiPermissions: Repository<ApiPermission>;
constructor() {
super();
this.apiPermissions = getRepository(ApiPermission);
}
getByGuildAndUserId(guildId, userId) {
return this.apiPermissions.findOne({
where: {
guild_id: guildId,
user_id: userId,
},
});
}
}