Open niteesh1215 opened 1 year ago
main.ts
import { Restivus } from 'meteor/nimble:restivus'; const RestApi = new Restivus({ apiPath: '/api/', prettyJson: true, enableCors: false });
api1.ts
import {RestApi } from './main'; RestApi.addRoute(':company/subscription', { authRequired: false }, { get: function () { //code .. } });
api2.ts
import {RestApi } from './main'; RestApi.addRoute(':subscription/event', { authRequired: false }, { post: function () { //code .. } });
This is how the code is divided into 3 files. The issue is, When I invoke the endpoint :company/subscription the url param that I get is
:company/subscription
{ subscription: "value" }
instead of
{ company: "value" }
But when I invoke the endpoint :subscription/event I get the correct url param i.e.
:subscription/event
main.ts
api1.ts
api2.ts
This is how the code is divided into 3 files. The issue is, When I invoke the endpoint
:company/subscription
the url param that I get isinstead of
But when I invoke the endpoint
:subscription/event
I get the correct url param i.e.