Fixed CategoryTagDirective.

pull/235/head
ruibaby 2019-06-27 10:23:02 +08:00
parent 2233dc8d12
commit 1a3fb94151
2 changed files with 2 additions and 1 deletions

View File

@ -15,7 +15,7 @@ import javax.servlet.http.HttpServletResponse;
import java.io.IOException; import java.io.IOException;
/** /**
* Admin page. * Main controller.
* *
* @author ryanwang * @author ryanwang
* @date : 2019-04-23 * @date : 2019-04-23

View File

@ -45,6 +45,7 @@ public class CategoryTagDirective implements TemplateDirectiveModel {
case "listByPostId": case "listByPostId":
Integer postId = Integer.parseInt(params.get("postId").toString()); Integer postId = Integer.parseInt(params.get("postId").toString());
env.setVariable("categories", builder.build().wrap(postCategoryService.listCategoryBy(postId))); env.setVariable("categories", builder.build().wrap(postCategoryService.listCategoryBy(postId)));
break;
case "count": case "count":
env.setVariable("count", builder.build().wrap(categoryService.count())); env.setVariable("count", builder.build().wrap(categoryService.count()));
break; break;