From 6a97628ffae5a0678ef30bb07967488037f58775 Mon Sep 17 00:00:00 2001 From: johnniang Date: Tue, 9 Apr 2019 14:01:10 +0800 Subject: [PATCH] Add a fetch theme configuration by theme id api --- .../halo/app/web/controller/admin/api/ThemeController.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/java/run/halo/app/web/controller/admin/api/ThemeController.java b/src/main/java/run/halo/app/web/controller/admin/api/ThemeController.java index d002897dd..fd1622842 100644 --- a/src/main/java/run/halo/app/web/controller/admin/api/ThemeController.java +++ b/src/main/java/run/halo/app/web/controller/admin/api/ThemeController.java @@ -87,11 +87,16 @@ public class ThemeController { return BaseResponse.ok(themeService.fetchConfig(themeService.getActivatedThemeId())); } + @GetMapping("{themeId}/configurations") + @ApiOperation("Fetches theme configuration by theme id") + public BaseResponse fetchConfig(@PathVariable("themeId") String themeId) { + return BaseResponse.ok(themeService.fetchConfig(themeId)); + } + @DeleteMapping("{themeId}") @ApiOperation("Deletes a theme") public void deleteBy(@PathVariable("themeId") String themeId) { themeService.deleteTheme(themeId); } - }