-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #437 from phuonghuynh/master
Update changes
- Loading branch information
Showing
112 changed files
with
4,266 additions
and
2,157 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 0 additions & 5 deletions
5
src/main/java/com/techlooper/config/CouchbaseConfiguration.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 0 additions & 6 deletions
6
src/main/java/com/techlooper/config/web/WebConfiguration.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
src/main/java/com/techlooper/controller/ChallengeCriteriaController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
package com.techlooper.controller; | ||
|
||
import com.techlooper.model.ChallengeCriteriaDto; | ||
import com.techlooper.model.ChallengeRegistrantCriteriaDto; | ||
import com.techlooper.service.ChallengeCriteriaService; | ||
import org.springframework.security.access.prepost.PreAuthorize; | ||
import org.springframework.web.bind.annotation.RequestBody; | ||
import org.springframework.web.bind.annotation.RequestMapping; | ||
import org.springframework.web.bind.annotation.RequestMethod; | ||
import org.springframework.web.bind.annotation.RestController; | ||
|
||
import javax.annotation.Resource; | ||
import javax.servlet.http.HttpServletRequest; | ||
import javax.servlet.http.HttpServletResponse; | ||
|
||
/** | ||
* Created by phuonghqh on 10/16/15. | ||
*/ | ||
@RestController | ||
public class ChallengeCriteriaController { | ||
|
||
@Resource | ||
private ChallengeCriteriaService challengeCriteriaService; | ||
|
||
@PreAuthorize("hasAuthority('EMPLOYER')") | ||
@RequestMapping(value = "challenge/criteria", method = RequestMethod.POST) | ||
public ChallengeCriteriaDto saveChallengeCriteria(@RequestBody ChallengeCriteriaDto challengeCriteriaDto, HttpServletRequest request, HttpServletResponse response) { | ||
ChallengeCriteriaDto result = challengeCriteriaService.saveChallengeCriteria(challengeCriteriaDto, request.getRemoteUser()); | ||
if (result == null) { | ||
response.setStatus(HttpServletResponse.SC_BAD_REQUEST); | ||
} | ||
return result; | ||
} | ||
|
||
@PreAuthorize("hasAuthority('EMPLOYER')") | ||
@RequestMapping(value = "challengeRegistrant/criteria", method = RequestMethod.POST) | ||
public ChallengeRegistrantCriteriaDto saveChallengeRegistrantCriteria(@RequestBody ChallengeRegistrantCriteriaDto registrantCriteriaDto, | ||
HttpServletRequest request, HttpServletResponse response) { | ||
ChallengeRegistrantCriteriaDto result = challengeCriteriaService.saveScoreChallengeRegistrantCriteria(registrantCriteriaDto, request.getRemoteUser()); | ||
if (result == null) { | ||
response.setStatus(HttpServletResponse.SC_BAD_REQUEST); | ||
} | ||
return result; | ||
} | ||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.