mirror of
https://github.com/umami-software/umami.git
synced 2026-02-07 22:27:16 +01:00
New admin section.
This commit is contained in:
parent
b78ff3b477
commit
ce1f6c3618
44 changed files with 515 additions and 157 deletions
|
|
@ -1,13 +1,14 @@
|
|||
import { z } from 'zod';
|
||||
import { parseRequest } from '@/lib/request';
|
||||
import { json, unauthorized } from '@/lib/response';
|
||||
import { pagingParams } from '@/lib/schema';
|
||||
import { pagingParams, searchParams } from '@/lib/schema';
|
||||
import { canViewUsers } from '@/lib/auth';
|
||||
import { getUsers } from '@/queries/prisma/user';
|
||||
|
||||
export async function GET(request: Request) {
|
||||
const schema = z.object({
|
||||
...pagingParams,
|
||||
...searchParams,
|
||||
});
|
||||
|
||||
const { auth, query, error } = await parseRequest(request, schema);
|
||||
|
|
@ -31,6 +32,9 @@ export async function GET(request: Request) {
|
|||
},
|
||||
},
|
||||
},
|
||||
orderBy: {
|
||||
createdAt: 'desc',
|
||||
},
|
||||
},
|
||||
query,
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue