diff --git a/docs-web/src/main/java/com/sismics/docs/rest/resource/DocumentResource.java b/docs-web/src/main/java/com/sismics/docs/rest/resource/DocumentResource.java index b9d5f08b..4609676d 100644 --- a/docs-web/src/main/java/com/sismics/docs/rest/resource/DocumentResource.java +++ b/docs-web/src/main/java/com/sismics/docs/rest/resource/DocumentResource.java @@ -109,7 +109,7 @@ public class DocumentResource extends BaseResource { @QueryParam("search") String search, @QueryParam("create_date_min") String createDateMinStr, @QueryParam("create_date_max") String createDateMaxStr, - @QueryParam("tags[]") List tagIdList) throws JSONException { + @QueryParam("tags") List tagIdList) throws JSONException { if (!authenticate()) { throw new ForbiddenClientException(); } @@ -161,7 +161,7 @@ public class DocumentResource extends BaseResource { public Response add( @FormParam("title") String title, @FormParam("description") String description, - @FormParam("tags[]") List tagList, + @FormParam("tags") List tagList, @FormParam("create_date") String createDateStr) throws JSONException { if (!authenticate()) { throw new ForbiddenClientException(); @@ -208,7 +208,7 @@ public class DocumentResource extends BaseResource { @PathParam("id") String id, @FormParam("title") String title, @FormParam("description") String description, - @FormParam("tags[]") List tagList, + @FormParam("tags") List tagList, @FormParam("create_date") String createDateStr) throws JSONException { if (!authenticate()) { throw new ForbiddenClientException(); diff --git a/docs-web/src/main/webapp/js/app.js b/docs-web/src/main/webapp/js/app.js index 097d8537..8b512d11 100644 --- a/docs-web/src/main/webapp/js/app.js +++ b/docs-web/src/main/webapp/js/app.js @@ -107,6 +107,7 @@ var App = angular.module('docs', ['ui.state', 'ui.bootstrap', 'ui.route', 'ui.ke // Configuring $http $httpProvider.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded;charset=utf-8'; + $httpProvider.defaults.headers.put['Content-Type'] = 'application/x-www-form-urlencoded;charset=utf-8'; $httpProvider.defaults.transformRequest = [function(data) { var param = function(obj) { var query = ''; @@ -118,7 +119,7 @@ var App = angular.module('docs', ['ui.state', 'ui.bootstrap', 'ui.route', 'ui.ke if(value instanceof Array) { for(i=0; i