mirror of
https://github.com/umami-software/umami.git
synced 2026-02-09 15:17:23 +01:00
Update endpoints.
This commit is contained in:
parent
4f03bec99e
commit
2b019796be
3 changed files with 3 additions and 21 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue