1
Fork 0
mirror of https://github.com/diced/zipline.git synced 2025-04-11 23:31:17 -05:00

customizable user id length

This commit is contained in:
dicedtomatoreal 2020-04-25 08:22:15 -07:00
parent 31082b4600
commit 7c6f30544a

View file

@ -1,5 +1,6 @@
import { Column, Entity, PrimaryColumn, PrimaryGeneratedColumn } from "typeorm";
import { randomId } from "../util";
import config from '../../config.json';
@Entity()
export class User {
@ -22,7 +23,7 @@ export class User {
this.username = options.username;
this.password = options.password;
this.administrator = options.administrator;
this.token = randomId(32)
this.token = randomId(config.user.randomIDSize)
return this;
}
}