🔧 chore(API/index.ts): add name parameter to postValidatePrompt function for improved code readability
The postValidatePrompt function now accepts a name parameter, which represents the name of the field to check. This change improves the code readability by explicitly specifying the name of the field being validated.
This commit is contained in:
parent
2344c575cf
commit
67ffdcd0c7
1 changed files with 3 additions and 1 deletions
|
|
@ -52,16 +52,18 @@ export async function postValidateCode(
|
|||
|
||||
/**
|
||||
* Checks the prompt for the code block by sending it to an API endpoint.
|
||||
*
|
||||
* @param {string} name - The name of the field to check.
|
||||
* @param {string} template - The template string of the prompt to check.
|
||||
* @param {APIClassType} frontend_node - The frontend node to check.
|
||||
* @returns {Promise<AxiosResponse<PromptTypeAPI>>} A promise that resolves to an AxiosResponse containing the validation results.
|
||||
*/
|
||||
export async function postValidatePrompt(
|
||||
name: string,
|
||||
template: string,
|
||||
frontend_node: APIClassType
|
||||
): Promise<AxiosResponse<PromptTypeAPI>> {
|
||||
return await axios.post("/api/v1/validate/prompt", {
|
||||
name: name,
|
||||
template: template,
|
||||
frontend_node: frontend_node,
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue