Skip to content

Commit

Permalink
fix: query by vanity does not work
Browse files Browse the repository at this point in the history
  • Loading branch information
skinmaker1345 committed Oct 19, 2024
1 parent 8a5c719 commit 1238fe0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions utils/Query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ async function getBot(id: string, topLevel = true): Promise<Bot> {
])
.leftJoin('owners_mapping', 'bots.id', 'owners_mapping.target_id')
.where({ 'bots.id': id })
.orWhereRaw(`(bots.flags & ${BotFlags.trusted}) and bots.vanity=?`, [id])
.orWhereRaw(`(bots.flags & ${BotFlags.partnered}) and bots.vanity=?`, [id])
.orWhere({ vanity: id, trusted: true })
.orWhere({ vanity: id, partnered: true })
.groupBy('bots.id')) as any[]

if (res) {
Expand Down

0 comments on commit 1238fe0

Please sign in to comment.