mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-18 14:23:44 +02:00
Fix handling for backups; correctly send along ignored files & directories
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
import { rawDataToServerBackup, ServerBackup } from '@/api/server/backups/getServerBackups';
|
||||
import http from '@/api/http';
|
||||
|
||||
export default (uuid: string, name?: string, ignore?: string): Promise<ServerBackup> => {
|
||||
export default (uuid: string, name?: string, ignored?: string): Promise<ServerBackup> => {
|
||||
return new Promise((resolve, reject) => {
|
||||
http.post(`/api/client/servers/${uuid}/backups`, {
|
||||
name, ignore,
|
||||
name, ignored,
|
||||
})
|
||||
.then(({ data }) => resolve(rawDataToServerBackup(data)))
|
||||
.catch(reject);
|
||||
|
||||
@@ -33,7 +33,7 @@ const ModalContent = ({ ...props }: RequiredModalProps) => {
|
||||
</div>
|
||||
<div className={'mb-6'}>
|
||||
<FormikFieldWrapper
|
||||
name={'ignore'}
|
||||
name={'ignored'}
|
||||
label={'Ignored Files & Directories'}
|
||||
description={`
|
||||
Enter the files or folders to ignore while generating this backup. Leave blank to use
|
||||
@@ -43,7 +43,7 @@ const ModalContent = ({ ...props }: RequiredModalProps) => {
|
||||
`}
|
||||
>
|
||||
<FormikField
|
||||
name={'contents'}
|
||||
name={'ignored'}
|
||||
component={'textarea'}
|
||||
className={'input-dark h-32'}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user