mirror of
https://iceshrimp.dev/iceshrimp/iceshrimp
synced 2024-12-13 14:18:10 +09:00
Refactor
This commit is contained in:
parent
27593b26d6
commit
815ab4c310
@ -1,3 +1,3 @@
|
|||||||
import rndstr from 'rndstr';
|
import rndstr from 'rndstr';
|
||||||
|
|
||||||
export default () => `0${rndstr('a-zA-Z0-9', 15)}`;
|
export default () => rndstr('a-zA-Z0-9', 16);
|
||||||
|
@ -1 +1 @@
|
|||||||
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
|
// Generate access token
|
||||||
const accessToken = '1' + rndstr('a-zA-Z0-9', 15);
|
const accessToken = rndstr('a-zA-Z0-9', 32);
|
||||||
|
|
||||||
// Fetch exist access token
|
// Fetch exist access token
|
||||||
const exist = await AccessTokens.findOne({
|
const exist = await AccessTokens.findOne({
|
||||||
|
Loading…
Reference in New Issue
Block a user