mirror of
https://github.com/paricafe/misskey.git
synced 2024-11-27 13:46:43 -06:00
52774bbe64
* wip * wip * wip * Update index.ts * Update gen-openapi-spec.ts * Update api.ja-JP.md * Fix * Improve doc * Update gen-openapi-spec.ts * Update redoc.html * Improve doc * Update gen-openapi-spec.ts * Improve doc * Update CHANGELOG.md
29 lines
518 B
TypeScript
29 lines
518 B
TypeScript
import rndstr from 'rndstr';
|
|
import RegistrationTicket from '../../../../models/registration-tickets';
|
|
import define from '../../define';
|
|
|
|
export const meta = {
|
|
desc: {
|
|
'ja-JP': '招待コードを発行します。'
|
|
},
|
|
|
|
tags: ['admin'],
|
|
|
|
requireCredential: true,
|
|
requireModerator: true,
|
|
|
|
params: {}
|
|
};
|
|
|
|
export default define(meta, async (ps) => {
|
|
const code = rndstr({ length: 5, chars: '0-9' });
|
|
|
|
await RegistrationTicket.insert({
|
|
createdAt: new Date(),
|
|
code: code
|
|
});
|
|
|
|
return {
|
|
code: code
|
|
};
|
|
});
|