Skip to content
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

187454249 ft middleware fns #41

Merged
merged 1 commit into from
Apr 29, 2024
Merged

Conversation

JeanIrad
Copy link
Contributor

@JeanIrad JeanIrad commented Apr 29, 2024

Purpose

implementing middleware functions

Changes Made

created:

  • check authentication
  • check Role

Testing Instructions

Provide instructions on how to test the changes

Related Issues

incompatible requests in in auth middleware

Checklist

Please review the following checklist and make sure all tasks are complete before submitting:

  • [ x] Code follows the project's coding standards
  • Changes are covered by tests
  • Documentation is updated (if applicable)
  • All tests pass

@JeanIrad JeanIrad added the bug Something isn't working label Apr 29, 2024
@JeanIrad JeanIrad force-pushed the 187454249-ft-middleware-fns branch from 8d30ba6 to 81b5459 Compare April 29, 2024 14:05
@JeanIrad JeanIrad added ready and removed bug Something isn't working labels Apr 29, 2024
Copy link
Collaborator

@P-Rwirangira P-Rwirangira left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work !

@JeanIrad JeanIrad force-pushed the 187454249-ft-middleware-fns branch from 81b5459 to 49bcc9a Compare April 29, 2024 14:19
	modified:   src/controllers/userController.ts
	modified:   src/database/models/user.ts
	modified:   src/helpers/token.generator.ts
	new file:   src/middlewares/authMiddlewares.ts
	modified:   src/routes/roleRoute.ts
	modified:   tsconfig.json
	modified:   src/middlewares/authMiddlewares.ts
@@ -115,6 +115,8 @@ export const getOneUser = async (req: Request, res: Response) => {
attributes: ['name'],
},
});
logger.info('getting user ....');
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add this loggers inside the if condition

@JeanIrad JeanIrad force-pushed the 187454249-ft-middleware-fns branch from 49bcc9a to 554b121 Compare April 29, 2024 14:38
@niyontwali niyontwali merged commit 01086fb into develop Apr 29, 2024
5 checks passed
P-Rwirangira pushed a commit that referenced this pull request Apr 30, 2024
P-Rwirangira pushed a commit that referenced this pull request Apr 30, 2024
P-Rwirangira pushed a commit that referenced this pull request Apr 30, 2024
P-Rwirangira pushed a commit that referenced this pull request Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants