Fix handling for backups; correctly send along ignored files & directories
This commit is contained in:
parent
b6a0cca0f9
commit
00b0d30c60
8 changed files with 31 additions and 16 deletions
|
@ -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'}
|
||||
/>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue