3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-10 20:35:02 +00:00

Add support for hiding cases with !hidecase

This commit is contained in:
Dragory 2019-01-13 17:56:14 +02:00
parent ab71481b8f
commit 8de31844d5
6 changed files with 105 additions and 13 deletions

View file

@ -53,6 +53,15 @@ export class GuildCases extends BaseRepository {
});
}
async setHidden(id: number, hidden: boolean): Promise<void> {
await this.cases.update(
{ id },
{
is_hidden: hidden
}
);
}
async create(data): Promise<Case> {
const result = await this.cases.insert({
...data,

View file

@ -23,6 +23,8 @@ export class Case {
@Column() created_at: string;
@Column() is_hidden: boolean;
@OneToMany(type => CaseNote, note => note.case)
notes: CaseNote[];
}