Skip to content
Snippets Groups Projects
Unverified Commit bce8c5a3 authored by syuilo's avatar syuilo
Browse files

Refactor

parent f44dc2dd
No related branches found
No related tags found
No related merge requests found
import rndstr from 'rndstr';
export default () => `0${rndstr('a-zA-Z0-9', 15)}`;
export default () => rndstr('a-zA-Z0-9', 16);
export default (token: string) => token.startsWith('0');
export default (token: string) => token.length === 16;
......@@ -39,7 +39,7 @@ export default define(meta, async (ps, user) => {
}
// Generate access token
const accessToken = '1' + rndstr('a-zA-Z0-9', 15);
const accessToken = rndstr('a-zA-Z0-9', 32);
// Fetch exist access token
const exist = await AccessTokens.findOne({
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment