Frontend adjusted for the new API.

This commit is contained in:
Leo Vasanko
2025-08-01 13:16:10 -06:00
parent c5e5fe23e3
commit 8882d0672b
5 changed files with 15 additions and 43 deletions

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}`)