Skip to content

Commit

Permalink
fix(authorization): canCreate should not return void (#502) (#504)
Browse files Browse the repository at this point in the history
Fixes Retrofit client for canCreate.

Modifies create check endpoint for consistency.
  • Loading branch information
spinnakerbot authored and ezimanyi committed Nov 6, 2019
1 parent 2807538 commit 9dcab2c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ Response hasAuthorization(
* @param resourceType The type of the resource
* @param resource The resource to check
*/
@POST("/authorize/{userId}/{resourceType}")
void canCreate(
@POST("/authorize/{userId}/{resourceType}/create")
Response canCreate(
@Path("userId") String userId,
@Path("resourceType") String resourceType,
@Body Object resource);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ public void getUserAuthorization(
response.setStatus(HttpServletResponse.SC_NOT_FOUND);
}

@RequestMapping(value = "/{userId:.+}/{resourceType:.+}", method = RequestMethod.POST)
@RequestMapping(value = "/{userId:.+}/{resourceType:.+}/create", method = RequestMethod.POST)
public void canCreate(
@PathVariable String userId,
@PathVariable String resourceType,
Expand Down

0 comments on commit 9dcab2c

Please sign in to comment.