mirror of
https://github.com/umami-software/umami.git
synced 2026-02-10 07:37:11 +01:00
DataTable refactor.
This commit is contained in:
parent
92ccc64e47
commit
6846355c63
17 changed files with 94 additions and 114 deletions
|
|
@ -1,7 +1,7 @@
|
|||
import { uuid } from 'lib/crypto';
|
||||
import { useAuth, useCors, useValidate } from 'lib/middleware';
|
||||
import { NextApiRequestQueryBody, ReportSearchFilterType, SearchFilter } from 'lib/types';
|
||||
import { getFilterValidation } from 'lib/yup';
|
||||
import { pageInfo } from 'lib/schema';
|
||||
import { NextApiResponse } from 'next';
|
||||
import { methodNotAllowed, ok } from 'next-basics';
|
||||
import { createReport, getReportsByUserId } from 'queries';
|
||||
|
|
@ -21,7 +21,7 @@ export interface ReportRequestBody {
|
|||
|
||||
const schema = {
|
||||
GET: yup.object().shape({
|
||||
...getFilterValidation(/All|Name|Description|Type|Username|Website Name|Website Domain/i),
|
||||
...pageInfo,
|
||||
}),
|
||||
POST: yup.object().shape({
|
||||
websiteId: yup.string().uuid().required(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue