File tree Expand file tree Collapse file tree 1 file changed +15
-5
lines changed
source code/TestDebugASPNET/pages Expand file tree Collapse file tree 1 file changed +15
-5
lines changed Original file line number Diff line number Diff line change 189189 disableButtons ();
190190
191191 try {
192- const result = await fetchAPI (urlApiEndpoint + ' ?action=start_backup' , {
193- method: ' POST'
192+ const formData = new FormData ();
193+ formData .append (' action' , ' start_backup' );
194+
195+ const result = await fetchAPI (urlApiEndpoint, {
196+ method: ' POST' ,
197+ body: formData
194198 });
195199
196200 if (result .ok && result .data ) {
219223
220224 try {
221225 const formData = new FormData ();
226+ formData .append (' action' , ' start_restore' );
222227 formData .append (' file' , fileRestore .files [0 ]);
223228
224- const result = await fetchAPI (urlApiEndpoint + ' ?action=start_restore ' , {
229+ const result = await fetchAPI (urlApiEndpoint, {
225230 method: ' POST' ,
226231 body: formData
227232 });
247252 }
248253
249254 try {
250- const result = await fetchAPI (urlApiEndpoint + ` ?action=stop&taskid=${ currentTaskId} ` , {
251- method: ' POST'
255+ const formData = new FormData ();
256+ formData .append (' action' , ' stop' );
257+ formData .append (' taskid' , currentTaskId);
258+
259+ const result = await fetchAPI (urlApiEndpoint, {
260+ method: ' POST' ,
261+ body: formData
252262 });
253263
254264 if (result .ok ) {
You can’t perform that action at this time.
0 commit comments