clear-router 2.9.2 → 2.9.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/core/CoreRouter.cjs
CHANGED
|
@@ -838,7 +838,7 @@ var CoreRouter = class {
|
|
|
838
838
|
let paramName = "id";
|
|
839
839
|
if (!!this.config.inferParamName && this.hasPackageInstalled("@h3ravel/support")) {
|
|
840
840
|
const { str } = (0, node_module.createRequire)(require("url").pathToFileURL(__filename).href)("@h3ravel/support");
|
|
841
|
-
paramName = str(basePath).singular().afterLast("/").toString();
|
|
841
|
+
paramName = str(basePath).singular().afterLast("/").camel().toString();
|
|
842
842
|
}
|
|
843
843
|
return new require_ResourceRoutes.ResourceRoutes(basePath, controller, paramName, options, ({ method, path, handler, middlewares, name }) => {
|
|
844
844
|
return this.add(method, path, handler, middlewares).name(name);
|
package/dist/core/CoreRouter.mjs
CHANGED
|
@@ -838,7 +838,7 @@ var CoreRouter = class {
|
|
|
838
838
|
let paramName = "id";
|
|
839
839
|
if (!!this.config.inferParamName && this.hasPackageInstalled("@h3ravel/support")) {
|
|
840
840
|
const { str } = createRequire(import.meta.url)("@h3ravel/support");
|
|
841
|
-
paramName = str(basePath).singular().afterLast("/").toString();
|
|
841
|
+
paramName = str(basePath).singular().afterLast("/").camel().toString();
|
|
842
842
|
}
|
|
843
843
|
return new ResourceRoutes(basePath, controller, paramName, options, ({ method, path, handler, middlewares, name }) => {
|
|
844
844
|
return this.add(method, path, handler, middlewares).name(name);
|
package/package.json
CHANGED