From 5f98f594d23e873a8d689cbf99d9e370200182bd Mon Sep 17 00:00:00 2001 From: wonderlandpark Date: Thu, 6 May 2021 22:31:28 +0900 Subject: [PATCH] chore: clearing cache for updates --- pages/api/v2/bots/[id]/index.ts | 2 +- pages/api/v2/bots/[id]/owners.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/pages/api/v2/bots/[id]/index.ts b/pages/api/v2/bots/[id]/index.ts index 6077caa..cd02d9e 100644 --- a/pages/api/v2/bots/[id]/index.ts +++ b/pages/api/v2/bots/[id]/index.ts @@ -87,7 +87,7 @@ const Bots = RequestHandler() if(!captcha) return ResponseWrapper(res, { code: 400, message: '캡챠 검증에 실패하였습니다.' }) if(req.body.name !== bot.name) return ResponseWrapper(res, { code: 400, message: '봇 이름을 입력해주세요.' }) remove.bot(bot.id) - + get.user.clear(user) return ResponseWrapper(res, { code: 200, message: '성공적으로 삭제했습니다.' }) }) diff --git a/pages/api/v2/bots/[id]/owners.ts b/pages/api/v2/bots/[id]/owners.ts index 962f33c..28f08bb 100644 --- a/pages/api/v2/bots/[id]/owners.ts +++ b/pages/api/v2/bots/[id]/owners.ts @@ -29,6 +29,7 @@ const BotOwners = RequestHandler() if(userFetched.indexOf(null) !== -1) return ResponseWrapper(res, { code: 400, message: '올바르지 않은 유저 ID를 포함하고 있습니다.' }) if(userFetched.length > 1 && userFetched[0].id !== (bot.owners as User[])[0].id) return ResponseWrapper(res, { code: 400, errors: ['소유자를 이전할 때는 다른 관리자를 포함할 수 없습니다.'] }) await update.botOwners(bot.id, validated.owners) + get.user.clear(user) return ResponseWrapper(res, { code: 200 }) })