没时间,没做
This commit is contained in:
parent
d9aa3f813a
commit
660ed0a9cb
|
|
@ -7,6 +7,7 @@ import (
|
||||||
"yyjishu.com/rubbish-class/rubbish"
|
"yyjishu.com/rubbish-class/rubbish"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
//swagger:response
|
||||||
type Community struct {
|
type Community struct {
|
||||||
gorm.Model
|
gorm.Model
|
||||||
Name string `gorm:"type:varchar(20);"`
|
Name string `gorm:"type:varchar(20);"`
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,12 @@ func CommunityListHandler(c *gin.Context) {
|
||||||
|
|
||||||
//CommunityCreateHandler 社区创建
|
//CommunityCreateHandler 社区创建
|
||||||
func CommunityCreateHandler(c *gin.Context) {
|
func CommunityCreateHandler(c *gin.Context) {
|
||||||
|
// swagger:route POST /community/create community
|
||||||
|
//
|
||||||
|
// 社区创建
|
||||||
|
//
|
||||||
|
// Responses:
|
||||||
|
// 200: Community
|
||||||
var model community.Community
|
var model community.Community
|
||||||
if err := c.ShouldBindJSON(&model); err != nil {
|
if err := c.ShouldBindJSON(&model); err != nil {
|
||||||
c.AbortWithStatusJSON(http.StatusBadRequest, nil)
|
c.AbortWithStatusJSON(http.StatusBadRequest, nil)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue