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:
@@ -678,7 +678,7 @@ async function removeShare(token) {
|
|||||||
|
|
||||||
async function lockFile(data) {
|
async function lockFile(data) {
|
||||||
try {
|
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 })
|
toast.add({ severity: 'success', summary: 'Ausgecheckt', detail: `${data.name} ist jetzt fuer dich gesperrt.`, life: 3000 })
|
||||||
await filesStore.loadFiles(currentParentId())
|
await filesStore.loadFiles(currentParentId())
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
@@ -690,7 +690,7 @@ async function unlockFile(data) {
|
|||||||
const isAdminOverride = data.locked_by !== auth.user?.username
|
const isAdminOverride = data.locked_by !== auth.user?.username
|
||||||
if (isAdminOverride && !confirm(`Den Lock von ${data.locked_by} zwangsweise entfernen?`)) return
|
if (isAdminOverride && !confirm(`Den Lock von ${data.locked_by} zwangsweise entfernen?`)) return
|
||||||
try {
|
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 })
|
toast.add({ severity: 'success', summary: 'Eingecheckt', detail: `${data.name} ist wieder frei.`, life: 3000 })
|
||||||
await filesStore.loadFiles(currentParentId())
|
await filesStore.loadFiles(currentParentId())
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
|||||||
Reference in New Issue
Block a user