Skip to content

Commit 5b0b3ea

Browse files
improvements createbackup
1 parent f3e0e35 commit 5b0b3ea

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/views/tenant/backup/CreateBackup.jsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,15 @@ const CreateBackup = () => {
3131

3232
const onSubmit = (values) => {
3333
const startDate = new Date()
34-
startDate.setHours(0, 0, 0, 0)
3534
//decrease by 45 seconds to ensure the task runs after the current time
3635
const unixTime = Math.floor(startDate.getTime() / 1000) - 45
3736
const shippedValues = {
3837
TenantFilter: tenantDomain,
3938
Name: `CIPP Backup ${tenantDomain}`,
4039
Command: { value: `New-CIPPBackup` },
41-
Parameters: { ...values },
40+
Parameters: { backupType: 'Scheduled', ScheduledBackupValues: { ...values } },
4241
ScheduledTime: unixTime,
43-
Recurrence: '1d',
42+
Recurrence: { value: '1d' },
4443
}
4544
genericPostRequest({ path: '/api/AddScheduledItem?hidden=true', values: shippedValues }).then(
4645
(res) => {

0 commit comments

Comments
 (0)