diff --git a/src/main/java/cc/ryanc/halo/utils/ThemeUtils.java b/src/main/java/cc/ryanc/halo/utils/ThemeUtils.java index 0b646661d..04acc2b14 100644 --- a/src/main/java/cc/ryanc/halo/utils/ThemeUtils.java +++ b/src/main/java/cc/ryanc/halo/utils/ThemeUtils.java @@ -41,8 +41,9 @@ public class ThemeUtils { /** * Scan themes by directory * - * @param file file - * @return List + * @param themesPath themes Path + * @param isInternal isInternal + * @return themes */ private static List getThemesByPath(File themesPath, boolean isInternal) { final List themes = new ArrayList<>(); @@ -146,6 +147,7 @@ public class ThemeUtils { /** * Get custom template, such as page_xxx.ftl, and xxx will be template name * + * @param theme theme name * @return List */ public static List getCustomTpl(String theme) throws FileNotFoundException { diff --git a/src/main/java/cc/ryanc/halo/web/controller/admin/api/ThemeController.java b/src/main/java/cc/ryanc/halo/web/controller/admin/api/ThemeController.java deleted file mode 100644 index d738fa673..000000000 --- a/src/main/java/cc/ryanc/halo/web/controller/admin/api/ThemeController.java +++ /dev/null @@ -1,30 +0,0 @@ -package cc.ryanc.halo.web.controller.admin.api; - -import cc.ryanc.halo.model.support.Theme; -import cc.ryanc.halo.utils.ThemeUtils; -import io.swagger.annotations.ApiOperation; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - -import java.util.List; - -/** - * @author : RYAN0UP - * @date : 2019/3/20 - */ -@RestController -@RequestMapping("/admin/api/themes") -public class ThemeController { - - /** - * List all themes - * - * @return themes - */ - @GetMapping - @ApiOperation("List all themes") - public List listAll() { - return ThemeUtils.getThemes(); - } -} diff --git a/src/main/java/cc/ryanc/halo/web/controller/core/InstallController.java b/src/main/java/cc/ryanc/halo/web/controller/core/InstallController.java index 1fba6a92c..5d96899b9 100644 --- a/src/main/java/cc/ryanc/halo/web/controller/core/InstallController.java +++ b/src/main/java/cc/ryanc/halo/web/controller/core/InstallController.java @@ -162,7 +162,7 @@ public class InstallController { // TODO and i18n for the category name, description category.setName("Initial Blog"); - category.setSnakeName("initial_blog"); + category.setSlugName("initial_blog"); category.setDescription("Initial Blog for alphabet"); return categoryService.create(category); } @@ -236,7 +236,7 @@ public class InstallController { //默认分类 Category category = new Category(); category.setName("未分类"); - category.setSnakeName("default"); + category.setSlugName("default"); category.setDescription("未分类"); category = categoryService.create(category);