From 0087cc9aa4490fed17fd1a81bd3ef99b7e7176f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20L=C3=B3pez=20Guimaraes?= Date: Sun, 29 Oct 2023 21:27:59 +0000 Subject: [PATCH] Simplify some code This is already handled by the account server. --- globals/password_from_pid.go | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/globals/password_from_pid.go b/globals/password_from_pid.go index 3c25f38..7c1ec2e 100644 --- a/globals/password_from_pid.go +++ b/globals/password_from_pid.go @@ -12,17 +12,11 @@ import ( func PasswordFromPID(pid uint32) (string, uint32) { ctx := metadata.NewOutgoingContext(context.Background(), GRPCAccountCommonMetadata) - response, err := GRPCAccountClient.GetNEXData(ctx, &pb_account.GetNEXDataRequest{Pid: pid}) + response, err := GRPCAccountClient.GetNEXPassword(ctx, &pb_account.GetNEXPasswordRequest{Pid: pid}) if err != nil { globals.Logger.Error(err.Error()) return "", nex.Errors.RendezVous.InvalidUsername } - // * We only allow tester accounts for now - if response.AccessLevel < 1 { - globals.Logger.Errorf("PID %d is not a tester!", response.Pid) - return "", nex.Errors.RendezVous.AccountDisabled - } - return response.Password, 0 }