mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-03-15 05:41:51 +00:00
GuildSavedMessages: only return non-deleted messages with find
This commit is contained in:
parent
68fa25fbc4
commit
2f341d97d8
1 changed files with 6 additions and 6 deletions
|
@ -62,12 +62,12 @@ export class GuildSavedMessages extends BaseRepository {
|
||||||
}
|
}
|
||||||
|
|
||||||
find(id) {
|
find(id) {
|
||||||
return this.messages.findOne({
|
return this.messages
|
||||||
where: {
|
.createQueryBuilder()
|
||||||
guild_id: this.guildId,
|
.where("guild_id = :guild_id", { guild_id: this.guildId })
|
||||||
id
|
.andWhere("id = :id", { id })
|
||||||
}
|
.andWhere("deleted_at IS NULL")
|
||||||
});
|
.getOne();
|
||||||
}
|
}
|
||||||
|
|
||||||
async create(data) {
|
async create(data) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue