mirror of https://github.com/halo-dev/halo
Create ThemeController and Change the field snakeName to slugName
parent
e6060a54ae
commit
e6982a22bc
|
@ -15,7 +15,7 @@ public class CategoryOutputDTO implements OutputConverter<CategoryOutputDTO, Cat
|
|||
|
||||
private String name;
|
||||
|
||||
private String snakeName;
|
||||
private String slugName;
|
||||
|
||||
private String description;
|
||||
|
||||
|
|
|
@ -15,5 +15,5 @@ public class TagOutputDTO implements OutputConverter<TagOutputDTO, Tag> {
|
|||
|
||||
private String name;
|
||||
|
||||
private String snakeName;
|
||||
private String slugName;
|
||||
}
|
||||
|
|
|
@ -37,8 +37,8 @@ public class Category {
|
|||
/**
|
||||
* 缩略名
|
||||
*/
|
||||
@Column(name = "snake_name", columnDefinition = "varchar(50) not null")
|
||||
private String snakeName;
|
||||
@Column(name = "slug_name", columnDefinition = "varchar(50) not null")
|
||||
private String slugName;
|
||||
|
||||
/**
|
||||
* 描述
|
||||
|
|
|
@ -35,8 +35,8 @@ public class Tag {
|
|||
/**
|
||||
* 缩略名
|
||||
*/
|
||||
@Column(name = "snake_name", columnDefinition = "varchar(255) not null")
|
||||
private String snakeName;
|
||||
@Column(name = "slug_name", columnDefinition = "varchar(255) not null")
|
||||
private String slugName;
|
||||
|
||||
/**
|
||||
* 创建时间戳
|
||||
|
|
|
@ -0,0 +1,32 @@
|
|||
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<Theme> listAll() {
|
||||
return ThemeUtils.getThemes();
|
||||
}
|
||||
|
||||
|
||||
}
|
Loading…
Reference in New Issue