silgi 0.41.26 → 0.41.27

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.
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import { defineCommand, runMain } from 'citty';
3
3
 
4
- const version = "0.41.26";
4
+ const version = "0.41.27";
5
5
  const packageJson = {
6
6
  version: version};
7
7
 
@@ -329,11 +329,24 @@ async function createSilgi(config) {
329
329
  }
330
330
  }
331
331
  }
332
- addRoute(silgi.router, object.apiType === "rest-graphql" ? "" : method, routeWithParams, {
333
- method: object.apiType === "rest-graphql" ? "" : method,
334
- route: routeWithParams,
335
- service: object
336
- });
332
+ if (object.apiType === "rest-graphql") {
333
+ addRoute(silgi.router, "", routeWithParams, {
334
+ method: "",
335
+ route: routeWithParams,
336
+ service: object
337
+ });
338
+ addRoute(silgi.router, method, routeWithParams, {
339
+ method,
340
+ route: routeWithParams,
341
+ service: object
342
+ });
343
+ } else {
344
+ addRoute(silgi.router, method, routeWithParams, {
345
+ method,
346
+ route: routeWithParams,
347
+ service: object
348
+ });
349
+ }
337
350
  }
338
351
  if (!silgi._middlewareRouter) {
339
352
  silgi._middlewareRouter = createRouter();
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "silgi",
3
3
  "type": "module",
4
- "version": "0.41.26",
4
+ "version": "0.41.27",
5
5
  "private": false,
6
6
  "sideEffects": false,
7
7
  "exports": {