mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-05-05 07:45:54 +02:00
wip
This commit is contained in:
@@ -2,6 +2,9 @@ import type { JSONSchema7 } from 'schema-type';
|
||||
import { IEndpointMeta } from './endpoints.types';
|
||||
import { localUsernameSchema, passwordSchema } from './schemas/user';
|
||||
import ms from 'ms';
|
||||
import { getJsonSchema } from './schemas';
|
||||
import * as perUserDriveChartSchema from './schemas/charts/per-user-drive';
|
||||
import * as driveChartSchema from './schemas/charts/drive';
|
||||
|
||||
export const endpoints = {
|
||||
//#region admin
|
||||
@@ -2984,6 +2987,29 @@ export const endpoints = {
|
||||
}],
|
||||
},
|
||||
//#endregion
|
||||
|
||||
//#region charts
|
||||
'charts/user/drive': {
|
||||
tags: ['charts', 'drive', 'users'],
|
||||
|
||||
allowGet: true,
|
||||
cacheSec: 60 * 60,
|
||||
|
||||
defines: [{
|
||||
req: {
|
||||
type: 'object',
|
||||
properties: {
|
||||
span: { type: 'string', enum: ['day', 'hour'] },
|
||||
limit: { type: 'integer', minimum: 1, maximum: 500, default: 30 },
|
||||
offset: { type: 'integer', nullable: true, default: null },
|
||||
userId: { type: 'string', format: 'misskey:id' },
|
||||
},
|
||||
required: ['span', 'userId'],
|
||||
},
|
||||
res: getJsonSchema(perUserDriveChartSchema.schema) satisfies JSONSchema7,
|
||||
}],
|
||||
},
|
||||
//#endregion
|
||||
} as const satisfies { [x: string]: IEndpointMeta; };
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user