Skip to content
Snippets Groups Projects

Can't use "PUT" #33

Merged Martin Lowe requested to merge github/fork/autumnfound/malowe/master/33 into master
6 files
+ 18
18
Compare changes
  • Side-by-side
  • Inline
Files
6
@@ -14,7 +14,7 @@ import javax.enterprise.context.RequestScoped;
import javax.inject.Inject;
import javax.ws.rs.Consumes;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.PUT;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
@@ -73,8 +73,8 @@ public class CatalogResource {
* @param catalog the Catalog object to insert into the database.
* @return response for the browser
*/
@POST
public Response postCatalog(Catalog catalog) {
@PUT
public Response putCatalog(Catalog catalog) {
MongoQuery<Catalog> q = new MongoQuery<>(params, dtoFilter, cachingService);
// add the object, and await the result
StreamHelper.awaitCompletionStage(dao.add(q, Arrays.asList(catalog)));
Loading