diff --git a/scripts/util/getRouteDescriptions.js b/scripts/util/getRouteDescriptions.js
index a79dac96..12fc61e5 100644
--- a/scripts/util/getRouteDescriptions.js
+++ b/scripts/util/getRouteDescriptions.js
@@ -15,10 +15,7 @@ let currentPath = "";
const proxy = (file, method, prefix, path, ...args) => {
const opts = args.find((x) => x?.prototype?.OPTS_MARKER == true);
- if (!opts)
- return console.error(
- `${file} has route without route() description middleware`,
- );
+ if (!opts) return console.error(`${file} has route without route() description middleware`);
console.log(prefix + path + " - " + method);
opts.file = file.replace("/dist/", "/src/").replace(".js", ".ts");
@@ -26,12 +23,7 @@ const proxy = (file, method, prefix, path, ...args) => {
};
express.Router = () => {
- return Object.fromEntries(
- methods.map((method) => [
- method,
- proxy.bind(null, currentFile, method, currentPath),
- ]),
- );
+ return Object.fromEntries(methods.map((method) => [method, proxy.bind(null, currentFile, method, currentPath)]));
};
RouteUtility.route = (opts) => {
@@ -50,8 +42,7 @@ module.exports = function getRouteDescriptions() {
currentPath = file.replace(root.slice(0, -1), "");
currentPath = currentPath.split(".").slice(0, -1).join("."); // trancate .js/.ts file extension of path
currentPath = currentPath.replaceAll("#", ":").replaceAll("\\", "/"); // replace # with : for path parameters and windows paths with slashes
- if (currentPath.endsWith("/index"))
- currentPath = currentPath.slice(0, "/index".length * -1); // delete index from path
+ if (currentPath.endsWith("/index")) currentPath = currentPath.slice(0, "/index".length * -1); // delete index from path
try {
require(file);
|