~edwargix/git.sr.ht

d9d750669dc7b7aaa6d4470069659a20d8acc048 — Conrad Hoffmann 1 year, 7 months ago b626d91
api: rename accessControlList() to acls()

To be consistent with other services (e.g. todo.sr.ht).
3 files changed, 4 insertions(+), 4 deletions(-)

M api/graph/complexity.go
M api/graph/schema.graphqls
M api/graph/schema.resolvers.go
M api/graph/complexity.go => api/graph/complexity.go +1 -1
@@ 21,7 21,7 @@ func ApplyComplexity(conf *api.Config) {
		}
		return c
	}
	conf.Complexity.Repository.AccessControlList = func(c int, cursor *model.Cursor) int {
	conf.Complexity.Repository.Acls = func(c int, cursor *model.Cursor) int {
		return cursorComplexity(c, cursor)
	}
	conf.Complexity.Repository.Log = func(c int, cursor *model.Cursor, from *string) int {

M api/graph/schema.graphqls => api/graph/schema.graphqls +1 -1
@@ 136,7 136,7 @@ type Repository {
  access: AccessMode! @access(scope: ACLS, kind: RO)

  # Only available to the repository owner
  accessControlList(cursor: Cursor): ACLCursor! @access(scope: ACLS, kind: RO)
  acls(cursor: Cursor): ACLCursor! @access(scope: ACLS, kind: RO)

  ## Plumbing API:


M api/graph/schema.resolvers.go => api/graph/schema.resolvers.go +2 -2
@@ 1104,8 1104,8 @@ func (r *repositoryResolver) Access(ctx context.Context, obj *model.Repository) 
	return mode, nil
}

// AccessControlList is the resolver for the accessControlList field.
func (r *repositoryResolver) AccessControlList(ctx context.Context, obj *model.Repository, cursor *coremodel.Cursor) (*model.ACLCursor, error) {
// Acls is the resolver for the acls field.
func (r *repositoryResolver) Acls(ctx context.Context, obj *model.Repository, cursor *coremodel.Cursor) (*model.ACLCursor, error) {
	if cursor == nil {
		cursor = coremodel.NewCursor(nil)
	}