From 04f907c8c8cf4e952ed6975338622d8bf8f27906 Mon Sep 17 00:00:00 2001 From: erik Date: Tue, 26 Mar 2024 15:28:55 +0100 Subject: [PATCH] Revert --- routers/api/v1/user/star.go | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/routers/api/v1/user/star.go b/routers/api/v1/user/star.go index aaae8cccd0..d45b1e6488 100644 --- a/routers/api/v1/user/star.go +++ b/routers/api/v1/user/star.go @@ -156,21 +156,13 @@ func Star(ctx *context.APIContext) { // "404": // "$ref": "#/responses/notFound" - userID := ctx.Doer.ID - repoID := ctx.Repo.Repository.ID - // TODO: why is this *context.APIContext passed, where a context.Context is expected? - err := repo_model.StarRepo(ctx, userID, repoID, true) + err := repo_model.StarRepo(ctx, ctx.Doer.ID, ctx.Repo.Repository.ID, true) if err != nil { ctx.Error(http.StatusInternalServerError, "StarRepo", err) return } - if err := repo_model.SendLikeActivities(ctx, userID, repoID); err != nil { - ctx.Error(http.StatusInternalServerError, "StarRepo", err) - return - } - ctx.Status(http.StatusNoContent) }