mirror of
https://github.com/umami-software/umami.git
synced 2026-02-12 08:37:13 +01:00
Update useValidate calls.
This commit is contained in:
parent
5e3c135388
commit
0d9b6e8355
37 changed files with 38 additions and 106 deletions
|
|
@ -22,9 +22,7 @@ export default async (
|
|||
) => {
|
||||
await useCors(req, res);
|
||||
await useAuth(req, res);
|
||||
|
||||
req.yup = schema;
|
||||
await useValidate(req, res);
|
||||
await useValidate(schema, req, res);
|
||||
|
||||
const { id: websiteId } = req.query;
|
||||
|
||||
|
|
|
|||
|
|
@ -22,9 +22,7 @@ export default async (
|
|||
) => {
|
||||
await useCors(req, res);
|
||||
await useAuth(req, res);
|
||||
|
||||
req.yup = schema;
|
||||
await useValidate(req, res);
|
||||
await useValidate(schema, req, res);
|
||||
|
||||
const { id: websiteId } = req.query;
|
||||
|
||||
|
|
|
|||
|
|
@ -34,9 +34,7 @@ export default async (
|
|||
) => {
|
||||
await useCors(req, res);
|
||||
await useAuth(req, res);
|
||||
|
||||
req.yup = schema;
|
||||
await useValidate(req, res);
|
||||
await useValidate(schema, req, res);
|
||||
|
||||
const { id: websiteId, timezone, url } = req.query;
|
||||
const { startDate, endDate, unit } = await parseDateRangeQuery(req);
|
||||
|
|
|
|||
|
|
@ -36,9 +36,7 @@ export default async (
|
|||
) => {
|
||||
await useCors(req, res);
|
||||
await useAuth(req, res);
|
||||
|
||||
req.yup = schema;
|
||||
await useValidate(req, res);
|
||||
await useValidate(schema, req, res);
|
||||
|
||||
const { id: websiteId } = req.query;
|
||||
|
||||
|
|
|
|||
|
|
@ -54,9 +54,7 @@ export default async (
|
|||
) => {
|
||||
await useCors(req, res);
|
||||
await useAuth(req, res);
|
||||
|
||||
req.yup = schema;
|
||||
await useValidate(req, res);
|
||||
await useValidate(schema, req, res);
|
||||
|
||||
const {
|
||||
id: websiteId,
|
||||
|
|
|
|||
|
|
@ -50,9 +50,7 @@ export default async (
|
|||
) => {
|
||||
await useCors(req, res);
|
||||
await useAuth(req, res);
|
||||
|
||||
req.yup = schema;
|
||||
await useValidate(req, res);
|
||||
await useValidate(schema, req, res);
|
||||
|
||||
const {
|
||||
id: websiteId,
|
||||
|
|
|
|||
|
|
@ -22,9 +22,7 @@ export default async (
|
|||
) => {
|
||||
await useCors(req, res);
|
||||
await useAuth(req, res);
|
||||
|
||||
req.yup = schema;
|
||||
await useValidate(req, res);
|
||||
await useValidate(schema, req, res);
|
||||
|
||||
const { id: websiteId } = req.query;
|
||||
|
||||
|
|
|
|||
|
|
@ -22,8 +22,7 @@ export default async (
|
|||
) => {
|
||||
await useCors(req, res);
|
||||
await useAuth(req, res);
|
||||
req.yup = schema;
|
||||
await useValidate(req, res);
|
||||
await useValidate(schema, req, res);
|
||||
|
||||
const { id: websiteId } = req.query;
|
||||
|
||||
|
|
|
|||
|
|
@ -50,9 +50,7 @@ export default async (
|
|||
) => {
|
||||
await useCors(req, res);
|
||||
await useAuth(req, res);
|
||||
|
||||
req.yup = schema;
|
||||
await useValidate(req, res);
|
||||
await useValidate(schema, req, res);
|
||||
|
||||
const {
|
||||
id: websiteId,
|
||||
|
|
|
|||
|
|
@ -20,9 +20,7 @@ const schema = {
|
|||
export default async (req: NextApiRequestQueryBody<ValuesRequestQuery>, res: NextApiResponse) => {
|
||||
await useCors(req, res);
|
||||
await useAuth(req, res);
|
||||
|
||||
req.yup = schema;
|
||||
await useValidate(req, res);
|
||||
await useValidate(schema, req, res);
|
||||
|
||||
const { id: websiteId, type } = req.query;
|
||||
|
||||
|
|
|
|||
|
|
@ -34,8 +34,8 @@ export default async (
|
|||
) => {
|
||||
await useCors(req, res);
|
||||
await useAuth(req, res);
|
||||
req.yup = schema;
|
||||
await useValidate(req, res);
|
||||
|
||||
await useValidate(schema, req, res);
|
||||
|
||||
const {
|
||||
user: { id: userId },
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue