Fix updating data sources
@@ -69,8 +69,12 @@ export class CatalogService {
}
createDataSource(datasource: DataSource): Observable<DataSource> {
+ if (typeof datasource.id === "string") {
+ return this.http.put<DataSource>("/proxy/v1/catalog/datasource/" + encodeURIComponent(datasource.id), datasource);
+ } else {
return this.http.post<DataSource>("/proxy/v1/catalog/datasource/", datasource);
}
+ }
deleteDataSource(datasource: DataSource): Observable<any> {
return this.http.delete<DataSource>("/proxy/v1/catalog/datasource/" + datasource.id);
