Skip to content
This repository was archived by the owner on Jul 12, 2019. It is now read-only.

Commit a6d3865

Browse files
authored
BUG: fix options request (#129)
1 parent e1bd7b7 commit a6d3865

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

euphoria-service/src/main/java/club/euphoria_recruiting/handler/PostingHandlers.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,9 @@ public Stream<Route<AsyncHandler<Response<ByteString>>>> routes() {
3636
Route.sync("GET", "/api/posting/company/<companyId>", this::getPostingsForCompany).withMiddleware(jsonMiddleware()),
3737
Route.sync("GET", "/api/posting/<location>/<industry>/<skillLevel>", this::searchPostings).withMiddleware(jsonMiddleware()),
3838
Route.sync("POST", "/api/posting/", this::createPosting).withMiddleware(jsonMiddleware()),
39-
Route.sync("PUT", "/api/posting", this::editPosting).withMiddleware(jsonMiddleware()),
40-
Route.sync("OPTIONS", "/api/posting", rc -> "ok").withMiddleware(jsonMiddleware()),
39+
Route.sync("OPTIONS", "/api/posting/", rc -> "ok").withMiddleware(jsonMiddleware()),
40+
Route.sync("PUT", "/api/posting/", this::editPosting).withMiddleware(jsonMiddleware()),
41+
Route.sync("OPTIONS", "/api/posting/", rc -> "ok").withMiddleware(jsonMiddleware()),
4142
Route.sync("DELETE", "/api/posting/<postingId>", this::deletePosting).withMiddleware(jsonMiddleware()),
4243
Route.sync("OPTIONS", "/api/posting/<postingId>", rc -> "ok").withMiddleware(jsonMiddleware())
4344
);

0 commit comments

Comments
 (0)