chore: stabilize lint and verify builds

This commit is contained in:
2026-02-06 11:51:32 +08:00
parent edede17880
commit 1782f64417
114 changed files with 3032 additions and 1345 deletions

View File

@@ -39,6 +39,7 @@ func (c *Content) List(
}
filter.TenantID = &tenantID
}
return services.Content.List(ctx, tenantID, filter)
}
@@ -56,6 +57,7 @@ func (c *Content) List(
func (c *Content) Get(ctx fiber.Ctx, id int64) (*dto.ContentDetail, error) {
tenantID := getTenantID(ctx)
uid := getUserID(ctx)
return services.Content.Get(ctx, tenantID, uid, id)
}
@@ -75,6 +77,7 @@ func (c *Content) Get(ctx fiber.Ctx, id int64) (*dto.ContentDetail, error) {
func (c *Content) ListComments(ctx fiber.Ctx, id int64, page int) (*requests.Pager, error) {
tenantID := getTenantID(ctx)
uid := getUserID(ctx)
return services.Content.ListComments(ctx, tenantID, uid, id, page)
}
@@ -94,6 +97,7 @@ func (c *Content) ListComments(ctx fiber.Ctx, id int64, page int) (*requests.Pag
func (c *Content) CreateComment(ctx fiber.Ctx, id int64, form *dto.CommentCreateForm) error {
tenantID := getTenantID(ctx)
uid := getUserID(ctx)
return services.Content.CreateComment(ctx, tenantID, uid, id, form)
}
@@ -111,6 +115,7 @@ func (c *Content) CreateComment(ctx fiber.Ctx, id int64, form *dto.CommentCreate
func (c *Content) LikeComment(ctx fiber.Ctx, id int64) error {
tenantID := getTenantID(ctx)
uid := getUserID(ctx)
return services.Content.LikeComment(ctx, tenantID, uid, id)
}
@@ -125,6 +130,7 @@ func (c *Content) LikeComment(ctx fiber.Ctx, id int64) error {
func (c *Content) AddLike(ctx fiber.Ctx, id int64) error {
tenantID := getTenantID(ctx)
uid := getUserID(ctx)
return services.Content.AddLike(ctx, tenantID, uid, id)
}
@@ -139,6 +145,7 @@ func (c *Content) AddLike(ctx fiber.Ctx, id int64) error {
func (c *Content) RemoveLike(ctx fiber.Ctx, id int64) error {
tenantID := getTenantID(ctx)
uid := getUserID(ctx)
return services.Content.RemoveLike(ctx, tenantID, uid, id)
}
@@ -153,6 +160,7 @@ func (c *Content) RemoveLike(ctx fiber.Ctx, id int64) error {
func (c *Content) AddFavorite(ctx fiber.Ctx, id int64) error {
tenantID := getTenantID(ctx)
uid := getUserID(ctx)
return services.Content.AddFavorite(ctx, tenantID, uid, id)
}
@@ -167,6 +175,7 @@ func (c *Content) AddFavorite(ctx fiber.Ctx, id int64) error {
func (c *Content) RemoveFavorite(ctx fiber.Ctx, id int64) error {
tenantID := getTenantID(ctx)
uid := getUserID(ctx)
return services.Content.RemoveFavorite(ctx, tenantID, uid, id)
}
@@ -181,5 +190,6 @@ func (c *Content) RemoveFavorite(ctx fiber.Ctx, id int64) error {
// @Success 200 {array} dto.Topic
func (c *Content) ListTopics(ctx fiber.Ctx) ([]dto.Topic, error) {
tenantID := getTenantID(ctx)
return services.Content.ListTopics(ctx, tenantID)
}