~sircmpwn/meta.sr.ht

b1deacf05beaa71755bfb5019fe41fcc0e631485 — Nicolas Schodet 6 months ago 90f017a 0.56.17
Fix field name when validating the PGP key in RegisterAccount

The consequence was that a validation error related to PGP key was not
shown on the web interface when trying to register a new user.
1 files changed, 2 insertions(+), 2 deletions(-)

M api/graph/schema.resolvers.go
M api/graph/schema.resolvers.go => api/graph/schema.resolvers.go +2 -2
@@ 614,9 614,9 @@ func (r *mutationResolver) RegisterAccount(ctx context.Context, email string, us
		keys, err := openpgp.ReadArmoredKeyRing(strings.NewReader(*pgpKey))
		valid.
			Expect(err == nil, "Invalid PGP key format: %v", err).
			WithField("key").
			WithField("pgpKey").
			And(len(keys) == 1, "Expected one key, found %d", len(keys)).
			WithField("key")
			WithField("pgpKey")
		if !valid.Ok() {
			return nil, nil
		}