From bae3e134f02b2f4a2e3994150faa088cc50f68ed Mon Sep 17 00:00:00 2001 From: Junseo Park Date: Sat, 27 Feb 2021 13:48:57 +0900 Subject: [PATCH] feat: added Developer Bot Schema --- utils/Yup.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/utils/Yup.ts b/utils/Yup.ts index 3af42fa..e16b197 100644 --- a/utils/Yup.ts +++ b/utils/Yup.ts @@ -133,4 +133,12 @@ export const ManageBotSchema = Yup.object({ _csrf: Yup.string().required() }) +export const DeveloperBotSchema: Yup.SchemaOf = Yup.object({ + webhook: Yup.string().matches(HTTPProtocol, 'http:// 또는 https:// 로 시작해야합니다.').matches(Url, '올바른 웹훅 URL을 입력해주세요.').max(64, 'URL은 최대 64자까지만 가능합니다.') +}) + +interface DeveloperBot { + webhook: string | null +} + export default Yup