Support blog logo and user avatar url.

pull/167/head^2
ruibaby 2019-05-18 09:22:27 +08:00 committed by John Niang
parent bdfe1b904b
commit 2ed74ef3e8
1 changed files with 2 additions and 2 deletions

View File

@ -48,7 +48,7 @@ public class MainController {
return HaloConst.HALO_VERSION;
}
@GetMapping("/user/avatar")
@GetMapping("/avatar")
public void avatar(HttpServletResponse response) throws IOException {
User user = userService.getCurrentUser().orElseThrow(() -> new ServiceException("Can not find blog owner"));
if (StringUtils.isNotEmpty(user.getAvatar())) {
@ -56,7 +56,7 @@ public class MainController {
}
}
@GetMapping("/blog/logo")
@GetMapping("/logo")
public void logo(HttpServletResponse response) throws IOException {
String blogLogo = optionService.getByProperty(BlogProperties.BLOG_LOGO).orElse("").toString();
if(StringUtils.isNotEmpty(blogLogo)){