You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
424 B
21 lines
424 B
package v1
|
|
|
|
import (
|
|
"go_fabric/pkg/util"
|
|
"go_fabric/service"
|
|
"net/http"
|
|
|
|
"github.com/gin-gonic/gin"
|
|
)
|
|
|
|
func PoemGet(c *gin.Context) {
|
|
var userRegister service.UserService
|
|
if err := c.ShouldBind(&userRegister); err == nil {
|
|
res := userRegister.Register(c.Request.Context())
|
|
c.JSON(http.StatusOK, res)
|
|
} else {
|
|
c.JSON(http.StatusBadRequest, ErrorResponse(err)) //400参数错误
|
|
util.LoggerObj.Error(err)
|
|
}
|
|
}
|