update query for communities, fix hardcoded mail
This commit is contained in:
parent
29b48bc8b2
commit
c69a1ba450
|
@ -320,7 +320,7 @@ public class ClaimController {
|
|||
@RequestParam(name = "types", defaultValue = "") ArrayList<String> types,
|
||||
@RequestParam(name = "mine", defaultValue = "false") Boolean mine) {
|
||||
Pageable pageable = PageRequest.of(offset, limit);
|
||||
return claimService.getClaimsBySource(pageable, mine, "alexandros.martzios@gmail.com", types, orderby, descending, keyword, "context", contextId);
|
||||
return claimService.getClaimsBySource(pageable, mine, authorizationService.getEmail(), types, orderby, descending, keyword, "context", contextId);
|
||||
}
|
||||
|
||||
@PreAuthorize("isAuthenticated()")
|
||||
|
|
|
@ -58,6 +58,12 @@ public class QueryGenerator {
|
|||
"c.sourceType = :sourceType " +
|
||||
" AND c.sourceId = :sourceId" +
|
||||
")";
|
||||
if(type == "context"){
|
||||
q = "AND (" +
|
||||
"c.sourceType = :sourceType " +
|
||||
" AND c.sourceId LIKE CONCAT(:sourceId, '%') " +
|
||||
")";
|
||||
}
|
||||
return q;
|
||||
}
|
||||
public static String getDateClause(Date from, Date to) {
|
||||
|
|
Loading…
Reference in New Issue