more reverts

This commit is contained in:
Denys Konovalov 2024-01-21 15:32:42 +01:00
parent 897c67b555
commit 065001c081
No known key found for this signature in database
GPG Key ID: 0037E1B0E33BD2C9

View File

@ -1037,7 +1037,8 @@ func Routes() *web.Route {
}, tokenRequiresScopes(auth_model.AccessTokenScopeCategoryUser), reqToken())
// Repositories (requires repo scope, org scope)
m.Post("/org/{org}/repos", tokenRequiresScopes(auth_model.AccessTokenScopeCategoryOrganization, auth_model.AccessTokenScopeCategoryRepository),
m.Post("/org/{org}/repos",
tokenRequiresScopes(auth_model.AccessTokenScopeCategoryOrganization, auth_model.AccessTokenScopeCategoryRepository),
reqToken(),
bind(api.CreateRepoOption{}),
repo.CreateOrgRepoDeprecated)
@ -1552,6 +1553,7 @@ func Routes() *web.Route {
m.Get("/registration-token", admin.GetRegistrationToken)
})
}, tokenRequiresScopes(auth_model.AccessTokenScopeCategoryAdmin), reqToken(), reqSiteAdmin())
m.Group("/projects", func() {
m.Combo("/{id}").Get(projects.GetProject).
Patch(bind(api.UpdateProjectPayload{}), projects.UpdateProject).