mirror of
https://github.com/pyrohost/pyrodactyl.git
synced 2026-04-05 19:51:59 +02:00
fix: download backup was the wrong addr
This commit is contained in:
@@ -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;
|
||||
};
|
||||
|
||||
@@ -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: '',
|
||||
|
||||
@@ -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,
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user