This commit is contained in:
tamaina 2023-05-15 17:59:30 +09:00 committed by GitHub
parent 5f2bbea6de
commit 69ba41bd8d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -133,13 +133,17 @@ export const endpoints = {
required: ['username', 'password'],
},
res: {
$ref: 'https://misskey-hub.net/api/schemas/User',
allOf: [{
$ref: 'https://misskey-hub.net/api/schemas/MeDetailed',
}, {
type: 'object',
properties: {
token: {
type: 'string',
},
},
required: ['token'],
}],
},
}],
},
@ -265,4 +269,25 @@ export const endpoints = {
res: undefined,
}],
},
"admin/announcements/create": {
tags: ['admin'],
requireCredential: true,
requireModerator: true,
defines: [{
req: {
type: 'object',
properties: {
title: { type: 'string', minLength: 1 },
text: { type: 'string', minLength: 1 },
imageUrl: { type: 'string', nullable: true, minLength: 1 },
},
required: ['title', 'text', 'imageUrl'],
},
res: {
$ref: 'https://misskey-hub.net/api/schemas/Announcement',
}
}],
},
} as const satisfies { [x: string]: IEndpointMeta; };