mirror of
https://github.com/Athou/commafeed.git
synced 2026-03-21 21:37:29 +00:00
use POST for operations that modify data
This commit is contained in:
@@ -135,7 +135,7 @@ public class AdminREST extends AbstractResourceREST {
|
||||
}
|
||||
|
||||
@Path("/users/delete")
|
||||
@GET
|
||||
@POST
|
||||
@ApiOperation(value = "Delete a user", notes = "Delete a user, and all his subscriptions")
|
||||
public Response delete(
|
||||
@ApiParam(value = "user id", required = true) @QueryParam("id") Long id) {
|
||||
|
||||
@@ -6,6 +6,7 @@ import java.util.List;
|
||||
|
||||
import javax.ws.rs.DefaultValue;
|
||||
import javax.ws.rs.GET;
|
||||
import javax.ws.rs.POST;
|
||||
import javax.ws.rs.Path;
|
||||
import javax.ws.rs.QueryParam;
|
||||
import javax.ws.rs.core.Response;
|
||||
@@ -142,7 +143,7 @@ public class EntriesREST extends AbstractResourceREST {
|
||||
}
|
||||
|
||||
@Path("/entry/mark")
|
||||
@GET
|
||||
@POST
|
||||
@ApiOperation(value = "Mark a feed entry", notes = "Mark a feed entry as read/unread")
|
||||
public Response markFeedEntry(
|
||||
@ApiParam(value = "entry id", required = true) @QueryParam("id") String id,
|
||||
@@ -159,7 +160,7 @@ public class EntriesREST extends AbstractResourceREST {
|
||||
}
|
||||
|
||||
@Path("/feed/mark")
|
||||
@GET
|
||||
@POST
|
||||
@ApiOperation(value = "Mark feed entries", notes = "Mark feed entries as read")
|
||||
public Response markFeedEntries(
|
||||
@ApiParam(value = "feed id", required = true) @QueryParam("id") String id,
|
||||
@@ -178,7 +179,7 @@ public class EntriesREST extends AbstractResourceREST {
|
||||
}
|
||||
|
||||
@Path("/category/mark")
|
||||
@GET
|
||||
@POST
|
||||
@ApiOperation(value = "Mark category entries", notes = "Mark feed entries as read")
|
||||
public Response markCategoryEntries(
|
||||
@ApiParam(value = "category id, or 'all'", required = true) @QueryParam("id") String id,
|
||||
|
||||
@@ -85,7 +85,7 @@ public class SubscriptionsREST extends AbstractResourceREST {
|
||||
return url;
|
||||
}
|
||||
|
||||
@GET
|
||||
@POST
|
||||
@Path("/feed/unsubscribe")
|
||||
@ApiOperation(value = "Unsubscribe to a feed", notes = "Unsubscribe to a feed")
|
||||
public Response unsubscribe(
|
||||
@@ -100,7 +100,7 @@ public class SubscriptionsREST extends AbstractResourceREST {
|
||||
}
|
||||
}
|
||||
|
||||
@GET
|
||||
@POST
|
||||
@Path("/feed/rename")
|
||||
@ApiOperation(value = "Rename a subscription", notes = "Rename a feed subscription")
|
||||
public Response rename(
|
||||
@@ -115,7 +115,7 @@ public class SubscriptionsREST extends AbstractResourceREST {
|
||||
}
|
||||
|
||||
@Path("/category/add")
|
||||
@GET
|
||||
@POST
|
||||
@ApiOperation(value = "Add a category", notes = "Add a new feed category")
|
||||
public Response addCategory(
|
||||
@ApiParam(value = "new name", required = true) @QueryParam("name") String name,
|
||||
@@ -134,7 +134,7 @@ public class SubscriptionsREST extends AbstractResourceREST {
|
||||
return Response.ok().build();
|
||||
}
|
||||
|
||||
@GET
|
||||
@POST
|
||||
@Path("/category/delete")
|
||||
@ApiOperation(value = "Delete a category", notes = "Delete an existing feed category")
|
||||
public Response deleteCategory(
|
||||
@@ -154,7 +154,7 @@ public class SubscriptionsREST extends AbstractResourceREST {
|
||||
}
|
||||
}
|
||||
|
||||
@GET
|
||||
@POST
|
||||
@Path("/category/rename")
|
||||
@ApiOperation(value = "Rename a category", notes = "Rename an existing feed category")
|
||||
public Response renameCategory(
|
||||
@@ -168,7 +168,7 @@ public class SubscriptionsREST extends AbstractResourceREST {
|
||||
return Response.ok(Status.OK).build();
|
||||
}
|
||||
|
||||
@GET
|
||||
@POST
|
||||
@Path("/category/collapse")
|
||||
@ApiOperation(value = "Collapse a category", notes = "Save collapsed or expanded status for a category")
|
||||
public Response collapse(
|
||||
|
||||
Reference in New Issue
Block a user