refactor(auth): added in correct bycrptjs
This commit is contained in:
@@ -1,6 +1,8 @@
|
|||||||
import bcrypt from "bcrypt";
|
import bcrypt from "bcryptjs";
|
||||||
|
export const checkPassword = async (
|
||||||
export const checkPassword = async (currentPassword: string, dbPassword: string) => {
|
currentPassword: string,
|
||||||
|
dbPassword: string
|
||||||
|
) => {
|
||||||
let decyptPass = "";
|
let decyptPass = "";
|
||||||
try {
|
try {
|
||||||
decyptPass = atob(dbPassword);
|
decyptPass = atob(dbPassword);
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import bcrypt from "bcrypt";
|
import bcrypt from "bcryptjs";
|
||||||
|
|
||||||
export const createPassword = async (password: string) => {
|
export const createPassword = async (password: string) => {
|
||||||
// encypt password
|
// encypt password
|
||||||
|
|||||||
Reference in New Issue
Block a user