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:
parent
ab71481b8f
commit
8de31844d5
6 changed files with 105 additions and 13 deletions
|
@ -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,
|
||||
|
|
|
@ -23,6 +23,8 @@ export class Case {
|
|||
|
||||
@Column() created_at: string;
|
||||
|
||||
@Column() is_hidden: boolean;
|
||||
|
||||
@OneToMany(type => CaseNote, note => note.case)
|
||||
notes: CaseNote[];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue