Add postCustomComponent API controller for uploading custom components.
This commit adds the postCustomComponent function to the API controller. It allows for uploading custom components by sending a POST request to `/api/v1/custom_component` with the code as a parameter.
This commit is contained in:
parent
da9764b3c5
commit
7744ee3639
1 changed files with 7 additions and 0 deletions
|
|
@ -339,3 +339,10 @@ export async function uploadFile(
|
|||
formData.append("file", file);
|
||||
return await axios.post(`/api/v1/upload/${id}`, formData);
|
||||
}
|
||||
|
||||
export async function postCustomComponent(
|
||||
code: string,
|
||||
apiClass: APIClassType
|
||||
): Promise<AxiosResponse<APIClassType>> {
|
||||
return await axios.post(`/api/v1/custom_component`, { code });
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue