From 34c82776fcaab55e18f1d230f09de006994e1928 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Acid=20Chicken=20=28=E7=A1=AB=E9=85=B8=E9=B6=8F=29?= Date: Tue, 29 Oct 2019 09:46:51 +0900 Subject: [PATCH] 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 --- src/server/api/endpoints/admin/invite.ts | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/server/api/endpoints/admin/invite.ts b/src/server/api/endpoints/admin/invite.ts index 4e264feef..d4c572e2e 100644 --- a/src/server/api/endpoints/admin/invite.ts +++ b/src/server/api/endpoints/admin/invite.ts @@ -16,16 +16,19 @@ export const meta = { params: {} }; -export default define(meta, async (ps) => { - const code = rndstr({ length: 5, chars: '0-9' }); +export default define(meta, async () => { + const code = rndstr({ + length: 8, + chars: '2-9A-HJ-NP-Z', // [0-9A-Z] w/o [01IO] (32 patterns) + }); await RegistrationTickets.save({ id: genId(), createdAt: new Date(), - code: code + code, }); return { - code: code + code, }; });