mirror of
https://github.com/notherealmarco/WASAPhoto.git
synced 2025-05-06 04:42:36 +02:00
Add SQL rows.Err handling
This commit is contained in:
parent
d20b0029bb
commit
4fed541bb7
5 changed files with 21 additions and 2 deletions
|
@ -48,6 +48,10 @@ func (db *appdbimpl) GetPhotoLikes(uid string, photo int64, requesting_uid strin
|
|||
}
|
||||
likes = append(likes, structures.UIDName{UID: uid, Name: name})
|
||||
}
|
||||
// We check if the iteration ended prematurely
|
||||
if err = rows.Err(); err != nil {
|
||||
return ERR_INTERNAL, nil, err
|
||||
}
|
||||
|
||||
return SUCCESS, &likes, nil
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue