chore: fix some code style

This commit is contained in:
Junseo Park 2021-02-22 22:26:53 +09:00
parent 8430a40253
commit 73d92a6d5a

View File

@ -6,7 +6,7 @@ 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'
const BotInfo = nc<ApiRequest, NextApiResponse>() const Bots = nc<ApiRequest, NextApiResponse>()
.get(async(req, res) => { .get(async(req, res) => {
const bot = await get.bot.load(req.query.id) const bot = await get.bot.load(req.query.id)
if(!bot) return ResponseWrapper(res, { code: 404, message: '존재하지 않는 봇입니다.' }) if(!bot) return ResponseWrapper(res, { code: 404, message: '존재하지 않는 봇입니다.' })
@ -38,10 +38,10 @@ const BotInfo = nc<ApiRequest, NextApiResponse>()
}) })
interface ApiRequest extends NextApiRequest { interface ApiRequest extends NextApiRequest {
body: AddBotSubmit body: AddBotSubmit | null
query: { query: {
id: string id: string
} }
} }
export default BotInfo export default Bots