fix: Lock/Unlock-Buttons in FilesView - doppelter /api-Prefix
apiClient hat baseURL '/api' - die URL darf nicht nochmal mit /api anfangen, sonst wird daraus /api/api/... und der Request geht ins Leere. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
5ba007ef51
commit
c63a52629d
|
|
@ -678,7 +678,7 @@ async function removeShare(token) {
|
|||
|
||||
async function lockFile(data) {
|
||||
try {
|
||||
await apiClient.post(`/api/files/${data.id}/lock`, { client_info: 'Web-GUI' })
|
||||
await apiClient.post(`/files/${data.id}/lock`, { client_info: 'Web-GUI' })
|
||||
toast.add({ severity: 'success', summary: 'Ausgecheckt', detail: `${data.name} ist jetzt fuer dich gesperrt.`, life: 3000 })
|
||||
await filesStore.loadFiles(currentParentId())
|
||||
} catch (err) {
|
||||
|
|
@ -690,7 +690,7 @@ async function unlockFile(data) {
|
|||
const isAdminOverride = data.locked_by !== auth.user?.username
|
||||
if (isAdminOverride && !confirm(`Den Lock von ${data.locked_by} zwangsweise entfernen?`)) return
|
||||
try {
|
||||
await apiClient.post(`/api/files/${data.id}/unlock`)
|
||||
await apiClient.post(`/files/${data.id}/unlock`)
|
||||
toast.add({ severity: 'success', summary: 'Eingecheckt', detail: `${data.name} ist wieder frei.`, life: 3000 })
|
||||
await filesStore.loadFiles(currentParentId())
|
||||
} catch (err) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue