fix read profiles
This commit is contained in:
parent
2187609683
commit
c64a1f1996
|
@ -138,7 +138,7 @@ export class User {
|
|||
check_distance($6::double precision, $7::double precision, (SELECT lat FROM cities WHERE ID = location), (SELECT lng FROM cities WHERE ID = location), range)`
|
||||
}
|
||||
AND (interest = $4 OR interest = 'b')
|
||||
AND NOT (room_id = ANY(ARRAY(SELECT recipient FROM read_profiles)))
|
||||
AND NOT EXISTS(SELECT sender, recipient FROM read_profiles WHERE sender = $2 AND recipient = room_id)
|
||||
ORDER BY RANDOM()
|
||||
LIMIT 1`, [myage, this.roomId, myinterest, mysex, myrange, lat, lng])
|
||||
).rows[0];
|
||||
|
|
Loading…
Reference in New Issue