diff --git a/src/pages/api/users/[userId]/index.ts b/src/pages/api/users/[userId]/index.ts index ca46ff16..d69cad3c 100644 --- a/src/pages/api/users/[userId]/index.ts +++ b/src/pages/api/users/[userId]/index.ts @@ -27,6 +27,9 @@ const schema = { password: yup.string(), role: yup.string().matches(/admin|user|view-only/i), }), + DELETE: yup.object().shape({ + userId: yup.string().uuid().required(), + }), }; export default async ( diff --git a/src/pages/api/websites/[websiteId]/index.ts b/src/pages/api/websites/[websiteId]/index.ts index 9154760e..c60a8399 100644 --- a/src/pages/api/websites/[websiteId]/index.ts +++ b/src/pages/api/websites/[websiteId]/index.ts @@ -28,6 +28,9 @@ const schema = { domain: yup.string(), shareId: yup.string().matches(SHARE_ID_REGEX, { excludeEmptyString: true }).nullable(), }), + DELETE: yup.object().shape({ + websiteId: yup.string().uuid().required(), + }), }; export default async (