fixing token redirect
This commit is contained in:
@@ -104,6 +104,8 @@ class AuthController {
|
|||||||
const bytes = CryptoJS.AES.decrypt(tokenRedirect, process.env.VITE_KEY_SESSION);
|
const bytes = CryptoJS.AES.decrypt(tokenRedirect, process.env.VITE_KEY_SESSION);
|
||||||
const decrypted = JSON.parse(bytes.toString(CryptoJS.enc.Utf8));
|
const decrypted = JSON.parse(bytes.toString(CryptoJS.enc.Utf8));
|
||||||
|
|
||||||
|
console.log("decrypted: ", decrypted);
|
||||||
|
|
||||||
const userPhone = decrypted?.user_phone
|
const userPhone = decrypted?.user_phone
|
||||||
const userName = decrypted?.user_name
|
const userName = decrypted?.user_name
|
||||||
const idData = decrypted?.id
|
const idData = decrypted?.id
|
||||||
|
|||||||
@@ -67,8 +67,8 @@ class NotifikasiWaService {
|
|||||||
for (const dataUser of dataUsers) {
|
for (const dataUser of dataUsers) {
|
||||||
if (dataUser.is_active) {
|
if (dataUser.is_active) {
|
||||||
const tokenRedirect = await generateTokenRedirect(
|
const tokenRedirect = await generateTokenRedirect(
|
||||||
dataUser.userPhone,
|
dataUser.contact_phone,
|
||||||
dataUser.userName,
|
dataUser.contact_name,
|
||||||
resultNotificationError.notification_error_id
|
resultNotificationError.notification_error_id
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -105,6 +105,8 @@ class NotifikasiWaService {
|
|||||||
param.bodyMessage
|
param.bodyMessage
|
||||||
);
|
);
|
||||||
|
|
||||||
|
console.log("resultSend: ", resultSend);
|
||||||
|
|
||||||
await updateNotificationErrorUserDb(
|
await updateNotificationErrorUserDb(
|
||||||
resultNotificationErrorUser[0].notification_error_user_id,
|
resultNotificationErrorUser[0].notification_error_user_id,
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user