mirror of
				https://codeberg.org/forgejo/forgejo.git
				synced 2025-11-04 00:11:04 +00:00 
			
		
		
		
	Revert
This commit is contained in:
		
					parent
					
						
							
								32d457f9a3
							
						
					
				
			
			
				commit
				
					
						04f907c8c8
					
				
			
		
					 1 changed files with 1 additions and 9 deletions
				
			
		| 
						 | 
				
			
			@ -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)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue