Spaces:
Building
Building
Update flare-ui/src/app/services/api.service.ts
Browse files
flare-ui/src/app/services/api.service.ts
CHANGED
@@ -93,7 +93,7 @@ export interface LLMConfig {
|
|
93 |
}
|
94 |
|
95 |
export interface Version {
|
96 |
-
|
97 |
caption?: string;
|
98 |
description?: string;
|
99 |
published: boolean;
|
@@ -321,9 +321,9 @@ export class ApiService {
|
|
321 |
);
|
322 |
}
|
323 |
|
324 |
-
updateVersion(projectId: number,
|
325 |
return this.http.put(
|
326 |
-
`${this.apiUrl}/projects/${projectId}/versions/${
|
327 |
data,
|
328 |
{ headers: this.getAuthHeaders() }
|
329 |
).pipe(
|
@@ -331,16 +331,16 @@ export class ApiService {
|
|
331 |
);
|
332 |
}
|
333 |
|
334 |
-
deleteVersion(projectId: number,
|
335 |
-
return this.http.delete(`${this.apiUrl}/projects/${projectId}/versions/${
|
336 |
headers: this.getAuthHeaders()
|
337 |
}).pipe(
|
338 |
catchError(this.handleError)
|
339 |
);
|
340 |
}
|
341 |
|
342 |
-
publishVersion(projectId: number,
|
343 |
-
return this.http.post(`${this.apiUrl}/projects/${projectId}/versions/${
|
344 |
headers: this.getAuthHeaders()
|
345 |
}).pipe(
|
346 |
catchError(this.handleError)
|
|
|
93 |
}
|
94 |
|
95 |
export interface Version {
|
96 |
+
no: number;
|
97 |
caption?: string;
|
98 |
description?: string;
|
99 |
published: boolean;
|
|
|
321 |
);
|
322 |
}
|
323 |
|
324 |
+
updateVersion(projectId: number, versionNo: number, data: any, force: boolean = false): Observable<any> {
|
325 |
return this.http.put(
|
326 |
+
`${this.apiUrl}/projects/${projectId}/versions/${versionNo}${force ? '?force=true' : ''}`,
|
327 |
data,
|
328 |
{ headers: this.getAuthHeaders() }
|
329 |
).pipe(
|
|
|
331 |
);
|
332 |
}
|
333 |
|
334 |
+
deleteVersion(projectId: number, versionNo: number): Observable<any> {
|
335 |
+
return this.http.delete(`${this.apiUrl}/projects/${projectId}/versions/${versionNo}`, {
|
336 |
headers: this.getAuthHeaders()
|
337 |
}).pipe(
|
338 |
catchError(this.handleError)
|
339 |
);
|
340 |
}
|
341 |
|
342 |
+
publishVersion(projectId: number, versionNo: number): Observable<any> {
|
343 |
+
return this.http.post(`${this.apiUrl}/projects/${projectId}/versions/${versionNo}/publish`, {}, {
|
344 |
headers: this.getAuthHeaders()
|
345 |
}).pipe(
|
346 |
catchError(this.handleError)
|