mirror of
https://github.com/notherealmarco/WASAPhoto.git
synced 2025-03-14 06:06:15 +01:00
Handled error for follow_status query in db: GetUserProfile
This commit is contained in:
parent
e475a6a339
commit
8d999514a5
1 changed files with 4 additions and 0 deletions
|
@ -50,6 +50,10 @@ func (db *appdbimpl) GetUserProfile(uid string, requesting_uid string) (QueryRes
|
||||||
var follow_status bool
|
var follow_status bool
|
||||||
err = db.c.QueryRow(`SELECT EXISTS (SELECT * FROM "follows" WHERE "follower" = ? AND "followed" = ?)`, requesting_uid, uid).Scan(&follow_status)
|
err = db.c.QueryRow(`SELECT EXISTS (SELECT * FROM "follows" WHERE "follower" = ? AND "followed" = ?)`, requesting_uid, uid).Scan(&follow_status)
|
||||||
|
|
||||||
|
if err != nil {
|
||||||
|
return ERR_INTERNAL, nil, err
|
||||||
|
}
|
||||||
|
|
||||||
return SUCCESS, &structures.UserProfile{
|
return SUCCESS, &structures.UserProfile{
|
||||||
UID: uid,
|
UID: uid,
|
||||||
Name: name,
|
Name: name,
|
||||||
|
|
Loading…
Reference in a new issue