Update endpoints.

This commit is contained in:
Brian Cao 2024-03-11 15:44:48 -07:00
parent 4f03bec99e
commit 2b019796be
3 changed files with 3 additions and 21 deletions

View file

@ -11,26 +11,15 @@ export interface TeamWebsiteRequestQuery extends SearchFilter {
teamId: string;
}
export interface TeamWebsiteRequestBody {
name: string;
domain: string;
shareId: string;
}
const schema = {
GET: yup.object().shape({
teamId: yup.string().uuid().required(),
...pageInfo,
}),
POST: yup.object().shape({
name: yup.string().max(100).required(),
domain: yup.string().max(500).required(),
shareId: yup.string().max(50).nullable(),
}),
};
export default async (
req: NextApiRequestQueryBody<TeamWebsiteRequestQuery, TeamWebsiteRequestBody>,
req: NextApiRequestQueryBody<TeamWebsiteRequestQuery, any>,
res: NextApiResponse,
) => {
await useAuth(req, res);