This commit is contained in:
newtbot
2024-01-24 14:37:57 +08:00
parent e710fa15a1
commit d0aeab286a
5 changed files with 5 additions and 36 deletions

View File

@ -13,7 +13,7 @@ const { generateUUID } = require("./generateUUID.js");
//can be used for api key or token. Both are the same logic
async function addAPIKey(userId, permission) {
let hashtoken = await generateUUID();
let apikey = await hashAPIKey(hashtoken);
let apikey = await hash(hashtoken);
let token = await apikeyModel.create({
userid: userId,