split in env required and dynamic values
This commit is contained in:
parent
f32143b7ac
commit
730c25a9a1
35 changed files with 491 additions and 198 deletions
|
@ -2,12 +2,12 @@ import { Request, Response } from "express";
|
|||
import speakeasy from "speakeasy";
|
||||
import QRCode from "qrcode";
|
||||
import InternalException from "../exceptions/internalException";
|
||||
import { CLUB_NAME } from "../env.defaults";
|
||||
import UserService from "../service/management/userService";
|
||||
import UserFactory from "../factory/admin/management/user";
|
||||
import { TransferUserOwnerCommand, UpdateUserCommand } from "../command/management/user/userCommand";
|
||||
import UserCommandHandler from "../command/management/user/userCommandHandler";
|
||||
import ForbiddenRequestException from "../exceptions/forbiddenRequestException";
|
||||
import SettingHelper from "../helpers/settingsHelper";
|
||||
|
||||
/**
|
||||
* @description get my by id
|
||||
|
@ -33,7 +33,7 @@ export async function getMyTotp(req: Request, res: Response): Promise<any> {
|
|||
|
||||
let { secret } = await UserService.getById(userId);
|
||||
|
||||
const url = `otpauth://totp/FF Admin ${CLUB_NAME}?secret=${secret}`;
|
||||
const url = `otpauth://totp/FF Admin ${SettingHelper.getSetting("club.name")}?secret=${secret}`;
|
||||
|
||||
QRCode.toDataURL(url)
|
||||
.then((result) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue