-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: migrate frontend routes and google analytics factory to ts #1405
Conversation
actually since you're touching the |
0e0ffc8
to
0a638df
Compare
src/loaders/express/index.ts
Outdated
@@ -147,6 +148,7 @@ const loadExpressApp = async (connection: Connection) => { | |||
routeFunction(app) | |||
}) | |||
|
|||
app.use(FrontendRouter) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can remove the /frontend prefix in frontend.routes
and add it here instead
@mantariksh thanks for reviewing, for re-review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, with a final question on file placement
* @returns {String} Current featureManager states | ||
*/ | ||
export const showFeaturesStates: RequestHandler< | ||
ParamsDictionary, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry one more thing, I realised that all these controllers still use the old method of supplying ParamsDictionary
as the first generic type argument, which we don't want as per #948. could you help change all of these to unknown
pls?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok edited; apart from showFeaturesStates
, the rest require ParamsDictionary
as the first generic type argument because they call createReqMeta(req)
and req is of interface Request
which requires ParamsDictionary
as the first generic type argument
|
||
interface IGoogleAnalyticsFactory { | ||
addGoogleAnalyticsData: RequestHandler< | ||
ParamsDictionary, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unknown
here as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as above, ParamsDictionary is needed
Problem
Tests
/frontend/environment
endpoint displays the envvars/frontend/features
endpoint displays the list of features and their activation state