feat: Configureer auth Swagger
This commit is contained in:
		
							parent
							
								
									e139f59afa
								
							
						
					
					
						commit
						855620cb67
					
				
					 5 changed files with 125 additions and 5 deletions
				
			
		|  | @ -9,14 +9,17 @@ router.get('/config', (req, res) => { | |||
| }); | ||||
| 
 | ||||
| router.get('/testAuthenticatedOnly', authenticatedOnly, (req, res) => { | ||||
|     /* #swagger.security = [{ "student": [ ] }, { "teacher": [ ] }] */ | ||||
|     res.json({message: "If you see this, you should be authenticated!"}); | ||||
| }); | ||||
| 
 | ||||
| router.get('/testStudentsOnly', studentsOnly, (req, res) => { | ||||
|     /* #swagger.security = [{ "student": [ ] }] */ | ||||
|     res.json({message: "If you see this, you should be a student!"}); | ||||
| }); | ||||
| 
 | ||||
| router.get('/testTeachersOnly', teachersOnly, (req, res) => { | ||||
|     /* #swagger.security = [{ "teacher": [ ] }] */ | ||||
|     res.json({message: "If you see this, you should be a teacher!"}); | ||||
| }); | ||||
| 
 | ||||
|  |  | |||
		Reference in a new issue