diff --git a/call-profile/main.go b/call-profile/main.go index 80389ef..0fdef1a 100644 --- a/call-profile/main.go +++ b/call-profile/main.go @@ -530,6 +530,12 @@ func handler(request events.APIGatewayProxyRequest) (events.APIGatewayProxyRespo var chaincode string var discordId string + if str, ok := dsnap.Data()["discordId"].(string); ok { + discordId = str + } else { + discordId = "" + } + if str, ok := dsnap.Data()["profileURL"].(string); ok { userUrl = str } else { @@ -541,12 +547,6 @@ func handler(request events.APIGatewayProxyRequest) (events.APIGatewayProxyRespo }, nil } - if str, ok := dsnap.Data()["discordId"].(string); ok { - discordId = str - } else { - discordId = "" - } - if str, ok := dsnap.Data()["chaincode"].(string); ok { if str == "" { logProfileSkipped(client, ctx, userId, "Profile Service Blocked or Chaincode is empty", sessionId)