From d9d750669dc7b7aaa6d4470069659a20d8acc048 Mon Sep 17 00:00:00 2001 From: Conrad Hoffmann Date: Thu, 27 Oct 2022 14:45:59 +0200 Subject: [PATCH] api: rename accessControlList() to acls() To be consistent with other services (e.g. todo.sr.ht). --- api/graph/complexity.go | 2 +- api/graph/schema.graphqls | 2 +- api/graph/schema.resolvers.go | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/api/graph/complexity.go b/api/graph/complexity.go index 70948e1..dae4213 100644 --- a/api/graph/complexity.go +++ b/api/graph/complexity.go @@ -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 { diff --git a/api/graph/schema.graphqls b/api/graph/schema.graphqls index 8572e6c..c555c2c 100644 --- a/api/graph/schema.graphqls +++ b/api/graph/schema.graphqls @@ -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: diff --git a/api/graph/schema.resolvers.go b/api/graph/schema.resolvers.go index e7005a5..b8fb373 100644 --- a/api/graph/schema.resolvers.go +++ b/api/graph/schema.resolvers.go @@ -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) } -- 2.38.4