From 7baf4f2fb208f4d8b76e4ee547af4adda426ab61 Mon Sep 17 00:00:00 2001 From: Peter Sanchez Date: Thu, 16 May 2024 17:40:17 -0600 Subject: [PATCH] Small cleanup and adding seo template block --- .gitignore | 1 + api/graph/schema.resolvers.go | 6 +++--- templates/base.html | 2 ++ 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index b71b112..a5abc1a 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,4 @@ media fixtures static/geo/* +/scripts diff --git a/api/graph/schema.resolvers.go b/api/graph/schema.resolvers.go index c38dc9f..816c48c 100644 --- a/api/graph/schema.resolvers.go +++ b/api/graph/schema.resolvers.go @@ -39,7 +39,7 @@ import ( "golang.org/x/image/draw" "golang.org/x/net/idna" "netlandish.com/x/gobwebs" - "netlandish.com/x/gobwebs-oauth2" + oauth2 "netlandish.com/x/gobwebs-oauth2" gaccounts "netlandish.com/x/gobwebs/accounts" "netlandish.com/x/gobwebs/database" "netlandish.com/x/gobwebs/email" @@ -4626,7 +4626,7 @@ func (r *queryResolver) GetOrgLinks(ctx context.Context, input *model.GetLinkInp } org := orgs[0] - if user.IsAuthenticated() && (org.CanRead(ctx, user) || org.OwnerID == int(user.ID)) { + if user.IsAuthenticated() && org.CanRead(ctx, user) { linkOpts.Filter = sq.And{ linkOpts.Filter, sq.Eq{"ol.visibility": []int{ @@ -4641,7 +4641,7 @@ func (r *queryResolver) GetOrgLinks(ctx context.Context, input *model.GetLinkInp } linkOpts.Filter = sq.And{ linkOpts.Filter, - sq.Expr("ol.org_id = ?", org.ID), + sq.Eq{"ol.org_id": org.ID}, } } else { // If not org slug was given we get only the public links diff --git a/templates/base.html b/templates/base.html index 2bee13e..c297117 100644 --- a/templates/base.html +++ b/templates/base.html @@ -11,6 +11,8 @@ + {{ block "seo" }} + {{ end }} {{ block "extrahead" . }}{{ end }} -- 2.45.2