Handled error for follow_status query in db: GetUserProfile

This commit is contained in:
Marco Realacci 2022-11-22 22:15:51 +01:00
parent e475a6a339
commit 8d999514a5

View file

@ -50,6 +50,10 @@ func (db *appdbimpl) GetUserProfile(uid string, requesting_uid string) (QueryRes
var follow_status bool
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{
UID: uid,
Name: name,