[bugfix] Ensure the delete function is callable and correctly handled in config setters.

This commit is contained in:
Sakamoto Shiina
2025-11-13 15:55:00 +09:00
parent 3a31b0a9fe
commit 3105df3486
4 changed files with 51 additions and 16 deletions

View File

@@ -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}`,