mirror of
https://github.com/notherealmarco/WASAPhoto.git
synced 2025-05-06 04:42:36 +02:00
Fix query errors
This commit is contained in:
parent
09adc06e18
commit
ebb5c4e6f7
10 changed files with 73 additions and 32 deletions
|
@ -22,12 +22,12 @@ func (db *appdbimpl) GetPhotoLikes(uid string, photo int64, requesting_uid strin
|
|||
WHERE "likes"."photo_id" = ?
|
||||
AND "likes"."user" NOT IN (
|
||||
SELECT "bans"."user" FROM "bans"
|
||||
WHERE "bans"."user" = ?
|
||||
AND "bans"."ban" = "likes"."user"
|
||||
WHERE "bans"."user" = "likes"."user"
|
||||
AND "bans"."ban" = ?
|
||||
)
|
||||
AND "likes"."user" = "users"."uid"
|
||||
OFFSET ?
|
||||
LIMIT ?`, photo, requesting_uid, start_index, limit)
|
||||
LIMIT ?
|
||||
OFFSET ?`, photo, requesting_uid, limit, start_index)
|
||||
if err != nil {
|
||||
return ERR_INTERNAL, nil, err
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue