1
0
Fork 0
mirror of synced 2024-07-11 09:15:48 +12:00

Fixing some issues detected by testing.

This commit is contained in:
mike12345567 2022-11-26 21:26:19 +00:00
parent 06d8d19aaa
commit 70242f3be7
3 changed files with 7 additions and 6 deletions

View file

@ -1,4 +1,4 @@
import { newid } from "../utils"
import { newid } from "../utils/hashing"
import { DEFAULT_TENANT_ID, Config } from "../constants"
import env from "../environment"
import {

View file

@ -0,0 +1,5 @@
import { v4 } from "uuid"
export function newid() {
return v4().replace(/-/g, "")
}

View file

@ -1,6 +1,6 @@
import env from "../environment"
export * from "../newid"
const bcrypt = env.JS_BCRYPT ? require("bcryptjs") : require("bcrypt")
import { v4 } from "uuid"
const SALT_ROUNDS = env.SALT_ROUNDS || 10
@ -12,7 +12,3 @@ export async function hash(data: string) {
export async function compare(data: string, encrypted: string) {
return bcrypt.compare(data, encrypted)
}
export function newid() {
return v4().replace(/-/g, "")
}