Skip to content

Commit

Permalink
🦄 fix variable naming
Browse files Browse the repository at this point in the history
  • Loading branch information
hellokaton committed Mar 22, 2017
1 parent 9b4bd0f commit eae4e1c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/com/tale/controller/IndexController.java
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public String index(Request request, @QueryParam(value = "limit", defaultValue =
/**
* 自定义页面
*/
@Route(values = {"/:pagename", "/:pagename.html"}, method = HttpMethod.GET)
@Route(values = {"/:cid", "/:cid.html"}, method = HttpMethod.GET)
public String page(@PathParam String cid, Request request) {
Contents contents = contentsService.getContents(cid);
if (null == contents) {
Expand Down Expand Up @@ -93,7 +93,7 @@ public String page(@PathParam String cid, Request request) {
* @param limit
* @return
*/
@Route(values = {"page/:pageIndex", "page/:pageIndex.html"}, method = HttpMethod.GET)
@Route(values = {"page/:page", "page/:page.html"}, method = HttpMethod.GET)
public String index(Request request, @PathParam int page, @QueryParam(value = "limit", defaultValue = "12") int limit) {
page = page < 0 || page > TaleConst.MAX_PAGE ? 1 : page;
Take take = new Take(Contents.class).eq("type", Types.ARTICLE).eq("status", Types.PUBLISH).page(page, limit, "created desc");
Expand Down

0 comments on commit eae4e1c

Please sign in to comment.