sharkey/packages/backend/src/server/api/endpoints/endpoints.ts

32 lines
614 B
TypeScript
Raw Normal View History

import define from '../define';
import endpoints from '../endpoints';
2019-04-18 21:29:19 +09:00
export const meta = {
2020-02-15 21:33:32 +09:00
requireCredential: false as const,
2019-04-18 21:29:19 +09:00
tags: ['meta'],
params: {
},
res: {
type: 'array' as const,
optional: false as const, nullable: false as const,
items: {
type: 'string' as const,
2021-12-09 23:58:30 +09:00
optional: false as const, nullable: false as const,
},
example: [
'admin/abuse-user-reports',
'admin/accounts/create',
'admin/announcements/create',
2021-12-09 23:58:30 +09:00
'...',
],
},
2019-04-18 21:29:19 +09:00
};
2022-01-03 02:12:50 +09:00
// eslint-disable-next-line import/no-default-export
2019-04-18 21:29:19 +09:00
export default define(meta, async () => {
return endpoints.map(x => x.name);
});