Create ThemeController and Change the field snakeName to slugName

pull/137/head
ruibaby 2019-03-20 10:34:26 +08:00
parent e6060a54ae
commit e6982a22bc
5 changed files with 38 additions and 6 deletions

View File

@ -15,7 +15,7 @@ public class CategoryOutputDTO implements OutputConverter<CategoryOutputDTO, Cat
private String name;
private String snakeName;
private String slugName;
private String description;

View File

@ -15,5 +15,5 @@ public class TagOutputDTO implements OutputConverter<TagOutputDTO, Tag> {
private String name;
private String snakeName;
private String slugName;
}

View File

@ -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;
/**
*

View File

@ -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;
/**
*

View File

@ -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();
}
}