Enable base response in content fetching api

pull/146/head
johnniang 2019-04-22 22:34:17 +08:00
parent d0576bf653
commit 7810637da4
1 changed files with 3 additions and 2 deletions

View File

@ -1,6 +1,7 @@
package run.halo.app.web.controller.admin.api;
import io.swagger.annotations.ApiOperation;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import run.halo.app.handler.theme.config.support.Group;
@ -52,8 +53,8 @@ public class ThemeController {
}
@GetMapping("files/content")
public String getContentBy(@RequestParam(name = "path") String path) {
return themeService.getTemplateContent(path);
public BaseResponse<String> getContentBy(@RequestParam(name = "path") String path) {
return BaseResponse.ok(HttpStatus.OK.getReasonPhrase(), themeService.getTemplateContent(path));
}
@PutMapping("files/content")