Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
mwangggg committed Oct 20, 2023
1 parent 652cc97 commit 41c6eeb
Showing 1 changed file with 15 additions and 7 deletions.
22 changes: 15 additions & 7 deletions src/app/Shared/Services/Api.service.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -503,9 +503,13 @@ export class ApiService {

// from file system path functions
uploadArchivedRecordingToGrafanaFromPath(jvmId: string, recordingName: string): Observable<boolean> {
return this.sendRequest('beta', `fs/recordings/${encodeURIComponent(jvmId)}/${encodeURIComponent(recordingName)}/upload`, {
method: 'POST',
}).pipe(
return this.sendRequest(
'beta',
`fs/recordings/${encodeURIComponent(jvmId)}/${encodeURIComponent(recordingName)}/upload`,
{
method: 'POST',
},
).pipe(
map((resp) => resp.ok),
first(),
);
Expand All @@ -529,10 +533,14 @@ export class ApiService {
}

postRecordingMetadataFromPath(jvmId: string, recordingName: string, labels: RecordingLabel[]): Observable<boolean> {
return this.sendRequest('beta', `fs/recordings/${encodeURIComponent(jvmId)}/${encodeURIComponent(recordingName)}/metadata/labels`, {
method: 'POST',
body: this.transformAndStringifyToRawLabels(labels),
}).pipe(
return this.sendRequest(
'beta',
`fs/recordings/${encodeURIComponent(jvmId)}/${encodeURIComponent(recordingName)}/metadata/labels`,
{
method: 'POST',
body: this.transformAndStringifyToRawLabels(labels),
},
).pipe(
map((resp) => resp.ok),
first(),
);
Expand Down

0 comments on commit 41c6eeb

Please sign in to comment.