mirror of https://github.com/halo-dev/halo
😢 修复Bug
parent
f6e23527dd
commit
122b3a0498
|
@ -40,7 +40,7 @@ public class ApiCategoryController {
|
|||
* @param cateUrl 分类路径
|
||||
* @return JsonResult
|
||||
*/
|
||||
@GetMapping(value = "/${cateUrl}")
|
||||
@GetMapping(value = "/{cateUrl}")
|
||||
public JsonResult categories(@PathVariable("cateUrl") String cateUrl){
|
||||
Category category = categoryService.findByCateUrl(cateUrl);
|
||||
if(null!=category){
|
||||
|
|
|
@ -4,6 +4,7 @@ import cc.ryanc.halo.model.domain.Link;
|
|||
import cc.ryanc.halo.model.dto.JsonResult;
|
||||
import cc.ryanc.halo.service.LinkService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
|
@ -25,6 +26,7 @@ public class ApiLinkController {
|
|||
*
|
||||
* @return JsonResult
|
||||
*/
|
||||
@GetMapping
|
||||
public JsonResult links(){
|
||||
List<Link> links = linkService.findAllLinks();
|
||||
if(null!=links && links.size()>0){
|
||||
|
|
|
@ -4,6 +4,7 @@ import cc.ryanc.halo.model.domain.Menu;
|
|||
import cc.ryanc.halo.model.dto.JsonResult;
|
||||
import cc.ryanc.halo.service.MenuService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
|
@ -25,6 +26,7 @@ public class ApiMenuController {
|
|||
*
|
||||
* @return JsonResult
|
||||
*/
|
||||
@GetMapping
|
||||
public JsonResult menus(){
|
||||
List<Menu> menus = menuService.findAllMenus();
|
||||
if(null!=menus && menus.size()>0){
|
||||
|
|
|
@ -53,7 +53,7 @@ public class ApiPostController {
|
|||
* @param postUrl 文章路径
|
||||
* @return JsonResult
|
||||
*/
|
||||
@GetMapping(value = "/posts/${postUrl}")
|
||||
@GetMapping(value = "/posts/{postUrl}")
|
||||
public JsonResult posts(@PathVariable(value = "postUrl") String postUrl){
|
||||
Post post = postService.findByPostUrl(postUrl,HaloConst.POST_TYPE_POST);
|
||||
if(null!=post){
|
||||
|
|
|
@ -43,7 +43,7 @@ public class ApiTagController {
|
|||
* @param tagUrl tagUrl
|
||||
* @return JsonResult
|
||||
*/
|
||||
@GetMapping(value = "/${tagUrl}")
|
||||
@GetMapping(value = "/{tagUrl}")
|
||||
public JsonResult tags(@PathVariable("tagUrl") String tagUrl){
|
||||
Tag tag = tagService.findByTagUrl(tagUrl);
|
||||
if(null!=tag){
|
||||
|
|
Loading…
Reference in New Issue