Make issue process of registration tickets better (#5545)

* Make issue process of registration tickets better

* Fix illegal indent

* Bye rangestr

* Update invite.ts

* Fix bug

* Update invite.ts
This commit is contained in:
Acid Chicken (硫酸鶏) 2019-10-29 09:46:51 +09:00 committed by syuilo
parent 02bde5150e
commit 34c82776fc
1 changed files with 7 additions and 4 deletions

View File

@ -16,16 +16,19 @@ export const meta = {
params: {} params: {}
}; };
export default define(meta, async (ps) => { export default define(meta, async () => {
const code = rndstr({ length: 5, chars: '0-9' }); const code = rndstr({
length: 8,
chars: '2-9A-HJ-NP-Z', // [0-9A-Z] w/o [01IO] (32 patterns)
});
await RegistrationTickets.save({ await RegistrationTickets.save({
id: genId(), id: genId(),
createdAt: new Date(), createdAt: new Date(),
code: code code,
}); });
return { return {
code: code code,
}; };
}); });