diff --git a/api/owner_get.go b/api/owner_get.go index f916693..dcd53f3 100644 --- a/api/owner_get.go +++ b/api/owner_get.go @@ -31,8 +31,8 @@ func ownerGetByOwnerToken(ownerToken string) (owner, error) { statement := ` SELECT ownerHex, email, name, confirmedEmail, joinDate FROM owners - WHERE email IN ( - SELECT email FROM ownerSessions + WHERE ownerHex IN ( + SELECT ownerHex FROM ownerSessions WHERE ownerToken = $1 ); `