Skip to content

Commit

Permalink
Update Changes & Bug Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
nixrajput committed Jul 27, 2024
1 parent 0ba1cf1 commit 5597fe7
Show file tree
Hide file tree
Showing 15 changed files with 128 additions and 48 deletions.
2 changes: 1 addition & 1 deletion dist/src/app/app-routes.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { Application } from "express";
declare class Routes {
mountApi(_express: Application): Application;
mountApiRoutes(_express: Application): Application;
}
declare const _default: Routes;
export default _default;
4 changes: 3 additions & 1 deletion dist/src/app/app-routes.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/src/app/app-routes.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/src/app/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/src/app/index.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/src/controllers/post/post.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/src/controllers/post/post.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/src/routes/auth.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/src/routes/post.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/tsconfig.tsbuildinfo

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions src/app/app-routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,22 @@ import type { Application } from "express";
import EnvConfig from "../config/env";
import Logger from "../logger";
import AuthRouter from "../routes/auth";
import PostRouter from "../routes/post";

class Routes {
/**
* @name mountApi
* @name mountApiRoutes
* @description Mount all api routes
* @param _express
* @returns Application
*/
public mountApi(_express: Application): Application {
public mountApiRoutes(_express: Application): Application {
const apiPrefix = EnvConfig.getConfig().API_PREFIX;
Logger.getInstance().info("Routes :: Mounting API routes...");

// Mounting Routes
_express.use(`/${apiPrefix}/auth`, AuthRouter);
// _express.use(`/${apiPrefix}/job`, JobRouter);
_express.use(`/${apiPrefix}/post`, PostRouter);

return _express;
}
Expand Down
2 changes: 1 addition & 1 deletion src/app/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ class ExpressApp {
* Mount all the routes
*/
private mouteRoutes(): void {
this.express = Routes.mountApi(this.express);
this.express = Routes.mountApiRoutes(this.express);
Logger.getInstance().info("Routes :: API routes mounted");
}

Expand Down
2 changes: 1 addition & 1 deletion src/controllers/post/post.ts
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ class PostController {
error?.message || error || StringValues.SOMETHING_WENT_WRONG;

Logger.getInstance().error(
"PostController: getJobs",
"PostController: getPostFeed",
"errorInfo:" + JSON.stringify(error)
);

Expand Down
Loading

0 comments on commit 5597fe7

Please sign in to comment.