From e6a73dead981f25e6cd96c634a399f71761dd43d Mon Sep 17 00:00:00 2001 From: Junseo Park Date: Thu, 18 Feb 2021 13:21:42 +0900 Subject: [PATCH] chore: changed response --- pages/api/v2/bots/[id].ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pages/api/v2/bots/[id].ts b/pages/api/v2/bots/[id].ts index b5b85a5..971aaa9 100644 --- a/pages/api/v2/bots/[id].ts +++ b/pages/api/v2/bots/[id].ts @@ -1,7 +1,7 @@ import { NextApiRequest, NextApiResponse } from 'next' import nc from 'next-connect' -import { get } from '@utils/Query' +import { get, put } from '@utils/Query' import ResponseWrapper from '@utils/ResponseWrapper' import { checkToken } from '@utils/Csrf' import { AddBotSubmit, AddBotSubmitSchema } from '@utils/Yup' @@ -26,7 +26,8 @@ const BotInfo = nc() if(!validated) return if(validated.id !== req.query.id) return ResponseWrapper(res, { code: 400, errors: ['요청 주소와 Body의 정보가 다릅니다.'] }) - return ResponseWrapper(res, { code: 200, data: { url: '/pendingBots/00000/00000' } }) + const result = await put.submitBot(user, validated) + return ResponseWrapper(res, { code: 200, data: result }) }) .patch(async (req, res) => { return res.send('Reserved')