From 46f64a789922001e87eecfc272b5625241e96ad7 Mon Sep 17 00:00:00 2001 From: Junseo Park Date: Sat, 27 Feb 2021 15:21:23 +0900 Subject: [PATCH] feat: added updateBotApplication --- utils/Query.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/utils/Query.ts b/utils/Query.ts index b9f5802..6e18424 100644 --- a/utils/Query.ts +++ b/utils/Query.ts @@ -225,6 +225,11 @@ async function getBotSpec(id: string, userID: string) { return serialize(res[0]) } +async function updateBotApplication(id: string, value: { webhook: string }) { + const res = await knex('bots').update({ webhook: value.webhook }).where({ id }) + return +} + async function getImage(url: string) { const res = await fetch(url) if(!res.ok) return null @@ -337,7 +342,8 @@ export const get = { } export const update = { - assignToken + assignToken, + updateBotApplication } export const put = {