Skip to main content

Insert Locale Data

Description

A function from your project that is used to add locale data to your table.

tip

Your function that will return "insertId" or "true" after successfully adding data or "0" or "false" if not added successfully

Example:

src/admin/actions.ts
export async function addHeroLocale(formData: FormData): Promise<string> {
/* database query that will return "insertId" or "0" */
return data;
}

Params:

  • FormData interface to get all the fields of an locale HTML form