mirror of
https://github.com/koreanbots/core.git
synced 2025-12-16 14:30:22 +00:00
chore: changed response
This commit is contained in:
parent
fdd5436066
commit
e6a73dead9
@ -1,7 +1,7 @@
|
|||||||
import { NextApiRequest, NextApiResponse } from 'next'
|
import { NextApiRequest, NextApiResponse } from 'next'
|
||||||
import nc from 'next-connect'
|
import nc from 'next-connect'
|
||||||
|
|
||||||
import { get } from '@utils/Query'
|
import { get, put } from '@utils/Query'
|
||||||
import ResponseWrapper from '@utils/ResponseWrapper'
|
import ResponseWrapper from '@utils/ResponseWrapper'
|
||||||
import { checkToken } from '@utils/Csrf'
|
import { checkToken } from '@utils/Csrf'
|
||||||
import { AddBotSubmit, AddBotSubmitSchema } from '@utils/Yup'
|
import { AddBotSubmit, AddBotSubmitSchema } from '@utils/Yup'
|
||||||
@ -26,7 +26,8 @@ const BotInfo = nc<ApiRequest, NextApiResponse>()
|
|||||||
|
|
||||||
if(!validated) return
|
if(!validated) return
|
||||||
if(validated.id !== req.query.id) return ResponseWrapper(res, { code: 400, errors: ['요청 주소와 Body의 정보가 다릅니다.'] })
|
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) => {
|
.patch(async (req, res) => {
|
||||||
return res.send('Reserved')
|
return res.send('Reserved')
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user