wip: compile one step further

forgejo-federated-star
Michael Jerger 7 months ago
parent 21910a1718
commit 2c69df6c46

@ -837,7 +837,7 @@ func Routes() *web.Route {
m.Group("/repository-id/{repsitory-id}", func() {
m.Get("", activitypub.Repository)
m.Post("/inbox", activitypub.ReqHTTPSignature(), activitypub.RepositoryInbox)
}, context_service.RepositoryAssignmentAPI())
}, context_service.RepositoryIDAssignmentAPI())
}, tokenRequiresScopes(auth_model.AccessTokenScopeCategoryActivityPub))
}

@ -23,10 +23,14 @@ func RepositoryIDAssignmentAPI() func(ctx *context.APIContext) {
}
var err error
ctx.Repo, err = repo_model.GetRepositoryByID(ctx, repositoryID)
repository := new(context.Repository)
// TODO: does repository struct need more infos?
repository.Repository, err = repo_model.GetRepositoryByID(ctx, repositoryID)
// TODO: check & convert errors
if err != nil {
ctx.Error(http.StatusInternalServerError, "GetRepositoryByID", err)
}
ctx.Repo = repository
}
}

Loading…
Cancel
Save