mirror of https://github.com/halo-dev/halo
Refactor ApiLinkController
parent
2f409949d2
commit
5f1d45ca04
|
@ -52,12 +52,7 @@ public class ApiLinkController {
|
||||||
* @return JsonResult
|
* @return JsonResult
|
||||||
*/
|
*/
|
||||||
@GetMapping
|
@GetMapping
|
||||||
public JsonResult links() {
|
public List<Link> links() {
|
||||||
final List<Link> links = linkService.listAll();
|
return linkService.listAll();
|
||||||
if (null != links && links.size() > 0) {
|
|
||||||
return new JsonResult(ResponseStatusEnum.SUCCESS.getCode(), ResponseStatusEnum.SUCCESS.getMsg(), links);
|
|
||||||
} else {
|
|
||||||
return new JsonResult(ResponseStatusEnum.EMPTY.getCode(), ResponseStatusEnum.EMPTY.getMsg());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue