File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -31,16 +31,15 @@ const CreateBackup = () => {
31
31
32
32
const onSubmit = ( values ) => {
33
33
const startDate = new Date ( )
34
- startDate . setHours ( 0 , 0 , 0 , 0 )
35
34
//decrease by 45 seconds to ensure the task runs after the current time
36
35
const unixTime = Math . floor ( startDate . getTime ( ) / 1000 ) - 45
37
36
const shippedValues = {
38
37
TenantFilter : tenantDomain ,
39
38
Name : `CIPP Backup ${ tenantDomain } ` ,
40
39
Command : { value : `New-CIPPBackup` } ,
41
- Parameters : { ...values } ,
40
+ Parameters : { backupType : 'Scheduled' , ScheduledBackupValues : { ...values } } ,
42
41
ScheduledTime : unixTime ,
43
- Recurrence : '1d' ,
42
+ Recurrence : { value : '1d' } ,
44
43
}
45
44
genericPostRequest ( { path : '/api/AddScheduledItem?hidden=true' , values : shippedValues } ) . then (
46
45
( res ) => {
You can’t perform that action at this time.
0 commit comments