Initial commit

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
2026-09-15 13:57:10 +08:00
co-authored by Claude Opus 5
commit 8679200f41
1897 changed files with 257900 additions and 0 deletions
+40
View File
@@ -0,0 +1,40 @@
package userctrl
import (
"91porn-server/app/service/userwatchrecordserver"
"91porn-server/common"
"91porn-server/common/stderr"
"91porn-server/models/v/userwatchrecordmod"
"github.com/gin-gonic/gin"
)
// WatchRecord doc
// @Summary 用户观看记录列表
// @Description 观看记录列表
// @Tags user
// @Accept json
// @Produce json
// @Param pageNumber query int true "第几页"
// @Param pageSize query int true "每页数量"
// @Success 200 object userwatchrecordmod.ListResponse "成功后返回"
// @Failure 400 {string} json "{"msg": "操作失败"}"
// @Router /mine/watch_record/list [get]
func WatchRecord(c *gin.Context) {
uid, err := common.GetUID(c)
if err != nil {
common.ServeJSON(c, stderr.ErrNoToken, err)
return
}
var req userwatchrecordmod.ListRequest
if err = c.ShouldBindQuery(&req); err != nil {
common.ServeJSON(c, stderr.ErrNoToken, err)
return
}
data, code := userwatchrecordserver.List(uid, &req)
if code != stderr.Success {
common.ServeJSON(c, code, err)
return
}
common.ServeJSON(c, code, data)
}