Devices update

This commit is contained in:
Jesse Malotaux 2025-04-11 14:06:45 +02:00
parent d38f999b27
commit b3a29126a4
4 changed files with 62 additions and 70 deletions

View file

@ -90,12 +90,15 @@ export const useDeviceStore = defineStore('device', () => {
}, 1000)
}
const remoteHandshake = async (key) => {
const remoteHandshake = async (keyStr = false) => {
if (!keyStr) keyStr = key()
if (!keyStr) return false
const handshake = await axios.post(appUrl() + '/device/handshake', {
uuid: uuid(),
shake: encryptAES(key, getDateStr()),
shake: encryptAES(keyStr, getDateStr()),
})
console.log(handshake)
return handshake.data
}