Frontend adjusted for the new API.

This commit is contained in:
2025-08-02 01:16:10 +00:00
parent 9b82f77729
commit f1ef7e43cc
5 changed files with 15 additions and 43 deletions
+2 -8
View File
@@ -80,14 +80,8 @@ export const useAuthStore = defineStore('auth', {
this.currentCredentials = result.credentials || []
this.aaguidInfo = result.aaguid_info || {}
},
async deleteCredential(credentialId) {
const response = await fetch('/auth/delete-credential', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({ credential_id: credentialId })
})
async deleteCredential(uuid) {
const response = await fetch(`/auth/credential/${uuid}`, {method: 'DELETE'})
const result = await response.json()
if (result.error) throw new Error(`Server: ${result.error}`)