fixed tests

part1, one test still failing
This commit is contained in:
Clemens 2024-03-28 09:36:08 +01:00
parent d624ebb712
commit 1ad7bdf983
11 changed files with 43 additions and 24 deletions

View file

@ -157,7 +157,7 @@ func Star(ctx *context.APIContext) {
// "$ref": "#/responses/notFound"
// TODO: why is this *context.APIContext passed, where a context.Context is expected?
err := repo_model.StarRepo(ctx, ctx.Doer, ctx.Repo.Repository.ID, true)
err := repo_model.StarRepo(ctx, *ctx.Doer, ctx.Repo.Repository.ID, true)
if err != nil {
ctx.Error(http.StatusInternalServerError, "StarRepo", err)
return
@ -188,7 +188,7 @@ func Unstar(ctx *context.APIContext) {
// "404":
// "$ref": "#/responses/notFound"
err := repo_model.StarRepo(ctx, ctx.Doer.ID, ctx.Repo.Repository.ID, false)
err := repo_model.StarRepo(ctx, *ctx.Doer, ctx.Repo.Repository.ID, false)
if err != nil {
ctx.Error(http.StatusInternalServerError, "StarRepo", err)
return