[bugfix] Ensure the delete function is callable and correctly handled in config setters.
This commit is contained in:
@@ -210,6 +210,7 @@ const buildRouteMetaList = () => {
|
||||
const ep = s.base_endpoint_name;
|
||||
const hookName = `use${category}`;
|
||||
const setSuccessMethodName = `setSuccess${base}`;
|
||||
const deleteSuccessMethodName = `deleteSuccess${base}`;
|
||||
const updateFromBackendMethodName = `updateFromBackend${base}`;
|
||||
|
||||
|
||||
@@ -231,6 +232,15 @@ const buildRouteMetaList = () => {
|
||||
method_name: updateFromBackendMethodName,
|
||||
});
|
||||
|
||||
if (s.logics_template_id === "get_set_delete") {
|
||||
generated.push({
|
||||
endpoint: `/delete/data/${ep}`,
|
||||
ns: namespace_module,
|
||||
hook_name: hookName,
|
||||
method_name: deleteSuccessMethodName,
|
||||
});
|
||||
}
|
||||
|
||||
if (s.logics_template_id !== "get_list") {
|
||||
generated.push({
|
||||
endpoint: `/set/data/${ep}`,
|
||||
|
||||
Reference in New Issue
Block a user