hotfix: unable to submit bot

This commit is contained in:
Eunwoo Choi 2024-10-22 12:41:13 +09:00 committed by GitHub
parent 05d5c12080
commit 442b1f6ecd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -570,7 +570,7 @@ async function submitBot(
id: string, id: string,
data: AddBotSubmit data: AddBotSubmit
): Promise<1 | 2 | 3 | 4 | 5 | SubmittedBot> { ): Promise<1 | 2 | 3 | 4 | 5 | SubmittedBot> {
const submits = await knex('submitted').select(['id']).where({ state: 0 }) const submits = await knex('submitted').select(['id']).where({ state: 0, owner: id })
if (submits.length > 1) return 1 if (submits.length > 1) return 1
const botId = data.id const botId = data.id
const strikes = await get.botSubmitStrikes(botId) const strikes = await get.botSubmitStrikes(botId)