feat: post api
This commit is contained in:
@@ -27,6 +27,7 @@ func (a *MyPlantApi) AddPlant(c *gin.Context) {
|
||||
err := c.ShouldBindJSON(&req)
|
||||
if err != nil {
|
||||
response.FailWithMsg("请求参数错误", c)
|
||||
return
|
||||
}
|
||||
userId := auth.GetUserId(c)
|
||||
err = plantService.AddPlant(req, userId)
|
||||
|
||||
Reference in New Issue
Block a user