mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-16 22:55:03 +00:00
Global cases
This commit is contained in:
parent
d24e39b4ec
commit
b019feefdf
1 changed files with 0 additions and 10 deletions
|
@ -24,7 +24,6 @@ export class GuildCases extends BaseGuildRepository {
|
|||
return this.cases.find({
|
||||
relations: this.getRelations(),
|
||||
where: {
|
||||
guild_id: this.guildId,
|
||||
id: In(ids),
|
||||
},
|
||||
});
|
||||
|
@ -34,7 +33,6 @@ export class GuildCases extends BaseGuildRepository {
|
|||
return this.cases.findOne({
|
||||
relations: this.getRelations(),
|
||||
where: {
|
||||
guild_id: this.guildId,
|
||||
id,
|
||||
},
|
||||
});
|
||||
|
@ -44,7 +42,6 @@ export class GuildCases extends BaseGuildRepository {
|
|||
return this.cases.findOne({
|
||||
relations: this.getRelations(),
|
||||
where: {
|
||||
guild_id: this.guildId,
|
||||
case_number: caseNumber,
|
||||
},
|
||||
});
|
||||
|
@ -54,7 +51,6 @@ export class GuildCases extends BaseGuildRepository {
|
|||
return this.cases.findOne({
|
||||
relations: this.getRelations(),
|
||||
where: {
|
||||
guild_id: this.guildId,
|
||||
mod_id: modId,
|
||||
},
|
||||
order: {
|
||||
|
@ -67,7 +63,6 @@ export class GuildCases extends BaseGuildRepository {
|
|||
return this.cases.findOne({
|
||||
relations: this.getRelations(),
|
||||
where: {
|
||||
guild_id: this.guildId,
|
||||
audit_log_id: auditLogId,
|
||||
},
|
||||
});
|
||||
|
@ -77,7 +72,6 @@ export class GuildCases extends BaseGuildRepository {
|
|||
return this.cases.find({
|
||||
relations: this.getRelations(),
|
||||
where: {
|
||||
guild_id: this.guildId,
|
||||
user_id: userId,
|
||||
},
|
||||
});
|
||||
|
@ -87,7 +81,6 @@ export class GuildCases extends BaseGuildRepository {
|
|||
return this.cases.find({
|
||||
relations: this.getRelations(),
|
||||
where: {
|
||||
guild_id: this.guildId,
|
||||
user_id: userId,
|
||||
},
|
||||
skip,
|
||||
|
@ -101,7 +94,6 @@ export class GuildCases extends BaseGuildRepository {
|
|||
async getTotalCasesByModId(modId: string): Promise<number> {
|
||||
return this.cases.count({
|
||||
where: {
|
||||
guild_id: this.guildId,
|
||||
mod_id: modId,
|
||||
is_hidden: false,
|
||||
},
|
||||
|
@ -112,7 +104,6 @@ export class GuildCases extends BaseGuildRepository {
|
|||
return this.cases.find({
|
||||
relations: this.getRelations(),
|
||||
where: {
|
||||
guild_id: this.guildId,
|
||||
mod_id: modId,
|
||||
is_hidden: false,
|
||||
},
|
||||
|
@ -158,7 +149,6 @@ export class GuildCases extends BaseGuildRepository {
|
|||
const lastCaseNumberRow = await this.cases
|
||||
.createQueryBuilder()
|
||||
.select(["MAX(case_number) AS last_case_number"])
|
||||
.where("guild_id = :guildId", { guildId: this.guildId })
|
||||
.getRawOne();
|
||||
const lastCaseNumber = lastCaseNumberRow?.last_case_number || 0;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue