Skip to content

Commit

Permalink
Fixed filter parameter name.
Browse files Browse the repository at this point in the history
  • Loading branch information
Tudor Groza committed Apr 10, 2021
1 parent 022b8b9 commit dba7932
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public class CurationConstants {

public static final String PARAM_ENTITY_ID = "entityId";

public static final String PARAM_SEARCH = "search";
public static final String PARAM_FILTER = "filter";

public static final String PARAM_CONTEXT = "context";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public class EntityController {
produces = MediaType.APPLICATION_JSON_VALUE)
@ResponseStatus(HttpStatus.OK)
public RestResponsePage<EntityDto> getEntities(@PathVariable String projectId,
@RequestParam(value = CurationConstants.PARAM_SEARCH, required = false) String prefix,
@RequestParam(value = CurationConstants.PARAM_FILTER, required = false) String prefix,
@RequestParam(value = CurationConstants.PARAM_CONTEXT, required = false) String context,
@PageableDefault(size = 20, page = 0) Pageable pageable, HttpServletRequest request) {
User user = jwtService.extractUser(HeadersUtil.extractJWT(request));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public class UsersController {
*/
@GetMapping(produces = MediaType.APPLICATION_JSON_VALUE)
@ResponseStatus(HttpStatus.OK)
public RestResponsePage<UserDto> getUsers(@RequestParam(value = CurationConstants.PARAM_SEARCH, required = false) String prefix,
public RestResponsePage<UserDto> getUsers(@RequestParam(value = CurationConstants.PARAM_FILTER, required = false) String prefix,
@PageableDefault(size = 20, page = 0) Pageable pageable,
HttpServletRequest request) {
User user = jwtService.extractUser(HeadersUtil.extractJWT(request));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public void shouldGetEntitiesByPrefixSearch() throws Exception {

String prefix = "chon";
String endpoint = GeneralCommon.API_V1 + CurationConstants.API_PROJECTS + "/" + project.getId() + CurationConstants.API_ENTITIES +
"?" + CurationConstants.PARAM_SEARCH + "=" + prefix;
"?" + CurationConstants.PARAM_FILTER + "=" + prefix;
String response = mockMvc.perform(get(endpoint)
.contentType(MediaType.APPLICATION_JSON)
.header(IDPConstants.JWT_TOKEN, "token1"))
Expand All @@ -123,7 +123,7 @@ public void shouldGetEntitiesByPrefixSearch() throws Exception {

prefix = "achond";
endpoint = GeneralCommon.API_V1 + CurationConstants.API_PROJECTS + "/" + project.getId() + CurationConstants.API_ENTITIES +
"?" + CurationConstants.PARAM_SEARCH + "=" + prefix;
"?" + CurationConstants.PARAM_FILTER + "=" + prefix;
response = mockMvc.perform(get(endpoint)
.contentType(MediaType.APPLICATION_JSON)
.header(IDPConstants.JWT_TOKEN, "token1"))
Expand Down

0 comments on commit dba7932

Please sign in to comment.