feat: 下载page到本地
This commit is contained in:
@@ -21,15 +21,15 @@ export class User extends Model {
|
||||
declare needChangePassword: boolean;
|
||||
declare description: string;
|
||||
declare data: UserData;
|
||||
declare type: string; // user | org
|
||||
declare type: string; // user | org | visitor
|
||||
declare owner: string;
|
||||
declare orgId: string;
|
||||
declare email: string;
|
||||
async createToken(uid?: string) {
|
||||
const { id, username } = this;
|
||||
const { id, username, type } = this;
|
||||
const expireTime = 60 * 60 * 24 * 7; // 7 days
|
||||
const now = new Date().getTime();
|
||||
const token = await createToken({ id, username, uid }, config.tokenSecret);
|
||||
const token = await createToken({ id, username, uid, type }, config.tokenSecret);
|
||||
return { token, expireTime: now + expireTime };
|
||||
}
|
||||
static async verifyToken(token: string) {
|
||||
|
||||
Reference in New Issue
Block a user