From 54c6456b17f6cba3a0a1b86c036dcd13876a31e0 Mon Sep 17 00:00:00 2001 From: Ming Wang Date: Tue, 16 Jan 2024 12:01:01 -0500 Subject: [PATCH] s --- src/app/Shared/Services/Api.service.tsx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/app/Shared/Services/Api.service.tsx b/src/app/Shared/Services/Api.service.tsx index 3ee54484c..be071fae9 100644 --- a/src/app/Shared/Services/Api.service.tsx +++ b/src/app/Shared/Services/Api.service.tsx @@ -226,7 +226,7 @@ export class ApiService { const headers = {}; headers['Content-Type'] = 'application/json'; - return this.sendLegacyRequest('v2', 'rules', 'Rule', { + return this.sendLegacyRequest('v2', 'rules', 'Rule Upload Failed', { method: 'POST', body: JSON.stringify(rule), headers: headers, @@ -572,7 +572,7 @@ export class ApiService { const body = new window.FormData(); body.append('template', file); - return this.sendLegacyRequest('v1', 'templates', 'Template', { + return this.sendLegacyRequest('v1', 'templates', 'Template Upload Failed', { body: body, method: 'POST', headers: {}, @@ -641,7 +641,7 @@ export class ApiService { const body = new window.FormData(); body.append('probeTemplate', file); - return this.sendLegacyRequest('v2', `probes/${file.name}`, 'Custom Probe Template', { + return this.sendLegacyRequest('v2', `probes/${file.name}`, 'Custom Probe Template Upload Failed', { method: 'POST', body: body, headers: {}, @@ -839,7 +839,7 @@ export class ApiService { body.append('recording', file); body.append('labels', JSON.stringify(labels)); - return this.sendLegacyRequest('v1', 'recordings', 'Recording', { + return this.sendLegacyRequest('v1', 'recordings', 'Recording Upload Failed', { method: 'POST', body: body, headers: {}, @@ -873,7 +873,7 @@ export class ApiService { const body = new window.FormData(); body.append('cert', file); - return this.sendLegacyRequest('v2', 'certificates', 'Certificate', { + return this.sendLegacyRequest('v2', 'certificates', 'Certificate Upload Failed', { method: 'POST', body, headers: {}, @@ -1454,9 +1454,9 @@ export class ApiService { if (!suppressNotifications) { try { const body = JSON.parse(detail).data.reason; - this.notifications.danger(`${title} Upload Failed`, body); + this.notifications.danger(`${title}`, body); } catch { - this.notifications.danger(`${title} Upload Failed`, detail); + this.notifications.danger(`${title}`, detail); } } });