@palbase/backend 9.0.0 → 9.0.1
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/index.cjs +5 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -920,6 +920,11 @@ function recordThrows(target, fnName, throws) {
|
|
|
920
920
|
// src/decorators/methods.ts
|
|
921
921
|
function makeMethodDecorator(method) {
|
|
922
922
|
return function(subpath, options = {}) {
|
|
923
|
+
if (typeof subpath !== "string") {
|
|
924
|
+
throw new Error(
|
|
925
|
+
`@${method[0]}${method.slice(1).toLowerCase()}(subpath) expects a string subpath, got ${typeof subpath}.` + (method === "QUERY" ? " If this is a zod schema on a method parameter: the query-string param decorator was renamed @QueryParams(schema) in @palbase/backend 9.0.0." : "")
|
|
926
|
+
);
|
|
927
|
+
}
|
|
923
928
|
return function(target, propertyKey) {
|
|
924
929
|
recordRoute(target, String(propertyKey), method, subpath, options);
|
|
925
930
|
};
|