missed compiled file

deepsource-autofix-76c6eb20
Dan Gowans 2022-10-18 11:15:31 -04:00
parent 3d6d1d08da
commit 71f9f7452d
1 changed files with 2 additions and 2 deletions

View File

@ -1,5 +1,5 @@
import fs from "node:fs/promises"; import fs from "node:fs/promises";
import crypto from "node:crypto"; import { v4 as uuidv4 } from "uuid";
import Debug from "debug"; import Debug from "debug";
const debug = Debug("lot-occupancy-system:functions.api"); const debug = Debug("lot-occupancy-system:functions.api");
const apiKeyPath = "data/apiKeys.json"; const apiKeyPath = "data/apiKeys.json";
@ -23,7 +23,7 @@ const saveApiKeys = async () => {
} }
}; };
const generateApiKey = (apiKeyPrefix) => { const generateApiKey = (apiKeyPrefix) => {
return apiKeyPrefix + "-" + crypto.randomUUID() + "-" + Date.now(); return apiKeyPrefix + "-" + uuidv4() + "-" + Date.now();
}; };
export const regenerateApiKey = async (userName) => { export const regenerateApiKey = async (userName) => {
apiKeys[userName] = generateApiKey(userName); apiKeys[userName] = generateApiKey(userName);