From cf248ee5b07d52d757e4972d62e8e8a127fa80aa Mon Sep 17 00:00:00 2001 From: Noah Metz Date: Fri, 21 Jul 2023 01:06:38 -0600 Subject: [PATCH] Add write to user when updating server --- gql.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gql.go b/gql.go index 3856be2..bc7acc6 100644 --- a/gql.go +++ b/gql.go @@ -201,7 +201,7 @@ func AuthHandler(ctx *Context, server *GQLThread) func(http.ResponseWriter, *htt ctx.Log.Logf("gql", "AUTHORIZING NEW USER %s - %s", key_id, shared) new_user := NewUser(fmt.Sprintf("GQL_USER %s", key_id.String()), time.Now(), remote_id, shared) - err := UpdateStates(ctx, []Node{server}, func(nodes NodeMap) error { + err := UpdateStates(ctx, []Node{server, &new_user}, func(nodes NodeMap) error { server.Users[key_id] = &new_user return nil })