Fix handling for backups; correctly send along ignored files & directories

This commit is contained in:
Dane Everitt 2020-04-18 23:26:59 -07:00
parent b6a0cca0f9
commit 00b0d30c60
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
8 changed files with 31 additions and 16 deletions

View file

@ -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);

View file

@ -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'}
/>