owner_get.go: fix incorrent owner session selection field

This commit is contained in:
Adhityaa Chandrasekar 2018-10-18 00:56:56 -04:00
parent 0c6ccdc0a1
commit af88db42b2

View File

@ -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
);
`