mirror of
https://github.com/ReCloudStudio/WebHooker.git
synced 2026-09-23 00:21:28 +00:00
feat(ui): update ui style
This commit is contained in:
parent
ca6dfd3f64
commit
47d7c9105b
35 changed files with 1577 additions and 591 deletions
|
|
@ -1018,7 +1018,12 @@ export async function adminAudit(event: H3Event): Promise<Record<string, unknown
|
|||
export async function adminApiMetrics(event: H3Event): Promise<Record<string, unknown>> {
|
||||
const auth = await requireAnyAccess(event);
|
||||
const env = cfEnv(event);
|
||||
const metrics = await getDeliveryMetrics(env.DB);
|
||||
const query = getQuery(event);
|
||||
const groupId = String(query["groupId"] ?? "") || undefined;
|
||||
if (groupId && !auth.scope.isSuper && !auth.scope.groupIds.has(groupId)) {
|
||||
return respondError(event, 403, "Forbidden");
|
||||
}
|
||||
const metrics = await getDeliveryMetrics(env.DB, groupId);
|
||||
if (auth.scope.isSuper) return { metrics };
|
||||
return {
|
||||
metrics: {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue