bugfix
This commit is contained in:
@@ -61,6 +61,27 @@ func (h *OutfitHandler) List(c *gin.Context) {
|
||||
response.ToResponse(out)
|
||||
}
|
||||
|
||||
// Community 分页查询社区穿搭(其他用户公开的穿搭)。
|
||||
func (h *OutfitHandler) Community(c *gin.Context) {
|
||||
response := app.NewResponse(c)
|
||||
userID, ok := middleware.GetUserID(c.Request.Context())
|
||||
if !ok {
|
||||
response.ToErrorResponse(errcode.Unauthorized)
|
||||
return
|
||||
}
|
||||
var request dto.OutfitCommunityListRequest
|
||||
if err := c.ShouldBindQuery(&request); err != nil {
|
||||
response.ToErrorResponse(errcode.InvalidParams.WithDetails(err.Error()))
|
||||
return
|
||||
}
|
||||
out, e := h.svc.CommunityList(c.Request.Context(), userID, &request)
|
||||
if e != nil {
|
||||
response.ToErrorResponse(e)
|
||||
return
|
||||
}
|
||||
response.ToResponse(out)
|
||||
}
|
||||
|
||||
// Get 获取穿搭详情(uuid 来自路径参数)。
|
||||
func (h *OutfitHandler) Get(c *gin.Context) {
|
||||
response := app.NewResponse(c)
|
||||
|
||||
Reference in New Issue
Block a user