fix: download backup was the wrong addr

This commit is contained in:
Naterfute
2026-01-13 06:04:14 -08:00
parent 1c97c256e2
commit 9096320fde
3 changed files with 5 additions and 2 deletions

View File

@@ -1,6 +1,7 @@
import http from '@/api/http';
import { getGlobalDaemonType } from '../getServer';
export default async (uuid: string, backup: string): Promise<string> => {
const { data } = await http.get(`/api/client/servers/${uuid}/backups/${backup}/download`);
const { data } = await http.get(`/api/client/servers/${getGlobalDaemonType()}/${uuid}/backups/${backup}/download`);
return data.attributes.url;
};

View File

@@ -15,6 +15,7 @@ export const restoreServerBackup = async (
const response = await http.post<RestoreBackupResponse>(
`/api/client/servers/${daemonType}/${uuid}/backups/${backup}/restore`,
{
// FIXME: This can't be right
adapter: 'rustic_s3',
truncate_directory: true,
download_url: '',

View File

@@ -1,9 +1,10 @@
import http from '@/api/http';
import { ServerBackup } from '@/api/server/types';
import { rawDataToServerBackup } from '@/api/transformers';
import { getGlobalDaemonType } from '../getServer';
export default async (uuid: string, backup: string, name: string): Promise<ServerBackup> => {
const { data } = await http.post(`/api/client/servers/${uuid}/backups/${backup}/rename`, {
const { data } = await http.post(`/api/client/servers/${getGlobalDaemonType()}/${uuid}/backups/${backup}/rename`, {
name: name,
});