Small update to encryptservice.

This commit is contained in:
Jesse Malotaux 2025-04-11 14:07:47 +02:00
parent b3a29126a4
commit 052ce611f9

View file

@ -1,5 +1,6 @@
import { useDeviceStore } from '@/stores/device' import { useDeviceStore } from '@/stores/device'
import { AES, enc, pad } from 'crypto-js' import { AES, enc, pad } from 'crypto-js'
import { isLocal } from './ApiService'
export const encryptAES = (key, str) => { export const encryptAES = (key, str) => {
key = keyPad(key) key = keyPad(key)
@ -24,6 +25,8 @@ export const decryptAES = (key, str) => {
} }
export const AuthCall = (data) => { export const AuthCall = (data) => {
if (isLocal()) return data
const device = useDeviceStore() const device = useDeviceStore()
return { return {