post Mock and corrections
This commit is contained in:
		@ -42,6 +42,7 @@ public class MockController {
 | 
			
		||||
    public final LessonRequestService lessonRequestService;
 | 
			
		||||
    ArrayList<User> mockUsers;
 | 
			
		||||
 | 
			
		||||
    public static boolean isMocked = false;
 | 
			
		||||
    public final ResearchesService researchesService;
 | 
			
		||||
    public final UserCurriculumRepository ucr;
 | 
			
		||||
    public final MinervalRepository minervalRepository;
 | 
			
		||||
@ -78,7 +79,7 @@ public class MockController {
 | 
			
		||||
    @PostMapping("/mock")
 | 
			
		||||
    public void postMock() {
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        if(!isMocked){
 | 
			
		||||
        // user part
 | 
			
		||||
        User herobrine = new User("brine","hero","admin@admin.com","behind","ShadowsLand",new Date(0), null,Role.Admin,"admin");
 | 
			
		||||
        User joe = new User("Piplo","Joe","student@student.com","roundabout","England",new Date(0), null,Role.Student,"student");
 | 
			
		||||
@ -230,6 +231,9 @@ public class MockController {
 | 
			
		||||
 | 
			
		||||
        externalCurriculum = new ExternalCurriculum(inscriptionRequest, "HEH", "Bachelier en informatique", "Completed", 2015, 2018, null, null);
 | 
			
		||||
        externalCurriculumRepository.save(externalCurriculum);
 | 
			
		||||
 | 
			
		||||
        isMocked = true;
 | 
			
		||||
    }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user