mirror of
https://github.com/Macrame-App/Macrame
synced 2025-12-29 15:29:26 +00:00
Devices update
This commit is contained in:
parent
d38f999b27
commit
b3a29126a4
4 changed files with 62 additions and 70 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue