Skip to content

Commit

Permalink
Schema add UI: fix passing wrong data in the request header (#11602)
Browse files Browse the repository at this point in the history
* fix(ui): UI shows a blank screen when it encounters a unknown task

* UI: fix incorrect content type passed in request headers
  • Loading branch information
jayeshchoudhary authored Sep 16, 2023
1 parent e26a29e commit 41ef450
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pinot-controller/src/main/resources/app/requests/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -229,13 +229,13 @@ export const rebalanceBrokersForTable = (tableName: string): Promise<AxiosRespon
baseApi.post(`/tables/${tableName}/rebuildBrokerResourceFromHelixTags`, null, {headers});

export const validateSchema = (schemaObject: string): Promise<AxiosResponse<OperationResponse>> =>
baseApi.post(`/schemas/validate`, JSON.stringify(schemaObject), {headers});
baseApi.post(`/schemas/validate`, schemaObject, {headers});

export const validateTable = (tableObject: string): Promise<AxiosResponse<OperationResponse>> =>
baseApi.post(`/tables/validate`, JSON.stringify(tableObject), {headers});

export const saveSchema = (schemaObject: string): Promise<AxiosResponse<OperationResponse>> =>
baseApi.post(`/schemas`, JSON.stringify(schemaObject), {headers});
baseApi.post(`/schemas`, schemaObject, {headers});

export const saveTable = (tableObject: string): Promise<AxiosResponse<OperationResponse>> =>
baseApi.post(`/tables`, JSON.stringify(tableObject), {headers});
Expand Down

0 comments on commit 41ef450

Please sign in to comment.