mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-21 08:31:27 -05:00
wip: compile one step further
This commit is contained in:
parent
317b7fac8f
commit
154be0a637
2 changed files with 6 additions and 2 deletions
|
@ -898,7 +898,7 @@ func Routes() *web.Route {
|
||||||
m.Group("/repository-id/{repsitory-id}", func() {
|
m.Group("/repository-id/{repsitory-id}", func() {
|
||||||
m.Get("", activitypub.Repository)
|
m.Get("", activitypub.Repository)
|
||||||
m.Post("/inbox", activitypub.ReqHTTPSignature(), activitypub.RepositoryInbox)
|
m.Post("/inbox", activitypub.ReqHTTPSignature(), activitypub.RepositoryInbox)
|
||||||
}, context_service.RepositoryAssignmentAPI())
|
}, context_service.RepositoryIDAssignmentAPI())
|
||||||
}, tokenRequiresScopes(auth_model.AccessTokenScopeCategoryActivityPub))
|
}, tokenRequiresScopes(auth_model.AccessTokenScopeCategoryActivityPub))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -23,10 +23,14 @@ func RepositoryIDAssignmentAPI() func(ctx *context.APIContext) {
|
||||||
}
|
}
|
||||||
|
|
||||||
var err error
|
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 {
|
if err != nil {
|
||||||
ctx.Error(http.StatusInternalServerError, "GetRepositoryByID", err)
|
ctx.Error(http.StatusInternalServerError, "GetRepositoryByID", err)
|
||||||
}
|
}
|
||||||
|
ctx.Repo = repository
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue