use of org.c4sg.dto.CreateProjectDTO in project c4sg-services by Code4SocialGood.
the class ProjectController method createProject.
@CrossOrigin
@RequestMapping(method = RequestMethod.POST)
@ApiOperation(value = "Add a new project")
public Map<String, Object> createProject(@ApiParam(value = "Project object to return", required = true) @RequestBody @Valid CreateProjectDTO createProjectDTO) {
System.out.println("************** Add **************");
Map<String, Object> responseData = null;
try {
ProjectDTO createProject = projectService.createProject(createProjectDTO);
responseData = Collections.synchronizedMap(new HashMap<>());
responseData.put("project", createProject);
} catch (Exception e) {
System.out.println(e);
}
return responseData;
}
Aggregations