From d2543f50df2a368bee717c3695541591e38991a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E1=84=8B=E1=85=B5=E1=84=8E=E1=85=A1=E1=86=AB=E1=84=8C?= =?UTF-8?q?=E1=85=B5=E1=86=AB?= Date: Tue, 1 Feb 2022 20:14:46 +0900 Subject: [PATCH] =?UTF-8?q?=ED=8B=B0=EC=BC=93=20url=20=EC=A3=BC=EC=86=8C?= =?UTF-8?q?=20=EB=B3=80=EA=B2=BD,=EC=9E=85=EA=B8=88=EC=9E=90=EB=AA=85=20?= =?UTF-8?q?=EC=A1=B0=EA=B1=B4=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/routes/RoutePostTickets.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/routes/RoutePostTickets.js b/src/routes/RoutePostTickets.js index 86c8f65..8509e2f 100644 --- a/src/routes/RoutePostTickets.js +++ b/src/routes/RoutePostTickets.js @@ -8,7 +8,7 @@ const moment = require('moment'); const { ServerCommonError, CustomError } = require('../errors'); const { Ticket } = require('../model'); -const url = 'https://gosrock.link/ticket/'; +const url = 'https://gosrock.link/tickets/'; RoutePostTickets.post( '/tickets', userAuthentication, @@ -16,7 +16,11 @@ RoutePostTickets.post( body('ticketCount') .isInt() .withMessage('ticketCount 0이상 10이하의 정수로 필요합니다.'), - body('accountName').isString().withMessage('accountName 숫자로 필요합니다.') + body('accountName') + .isString() + .withMessage('accountName 숫자로 필요합니다.') + .isLength({ min: 2, max: 4 }) + .withMessage('name 길이는 3자이어야 합니다.') ], validationCatch, async (req, res, next) => {