From 9b31c2265ab12d6e11bc7e2f49754721490b8608 Mon Sep 17 00:00:00 2001 From: Matthias Betz <matthias.betz@hft-stuttgart.de> Date: Thu, 18 Jul 2024 16:33:45 +0200 Subject: [PATCH] changing uuid entry --- routes/account.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/routes/account.ts b/routes/account.ts index e817a91d..669424f3 100644 --- a/routes/account.ts +++ b/routes/account.ts @@ -2,7 +2,6 @@ import fs from 'fs' import async from 'async' import bcrypt from 'bcryptjs' import * as passportSaml from 'passport-saml' -import {v4 as uuidv4} from 'uuid'; import dbconn from '../config/dbconn' import methods from '../functions/methods' import gitlab from '../functions/gitlab' @@ -436,6 +435,7 @@ export = function (app:any, config:any, passport:any, lang:string) { if (!req.files) { callback(null, newLogoFile) } else { + const uuidv4 = require('uuid/v4'); let fileName = uuidv4(); newLogoFile.mv(logoDir + fileName, function(err:any) { newLogoFile = logoDir + fileName @@ -532,6 +532,7 @@ export = function (app:any, config:any, passport:any, lang:string) { callback(null, newLogoFile) } else { newLogoFile = req.files.logo + const uuidv4 = require('uuid/v4'); let fileName = uuidv4(); newLogoFile.mv(logoDir + fileName, function(err:any) { newLogoFile = logoDir + fileName -- GitLab