fix check condition
This commit is contained in:
parent
b495dee7d4
commit
c2b96c69d1
@ -33,10 +33,10 @@ func GetAllFacebookPage() (pages []*FacebookPage, err error) {
|
|||||||
func GetFacebookPage(id string) (page *FacebookPage, err error) {
|
func GetFacebookPage(id string) (page *FacebookPage, err error) {
|
||||||
page = &FacebookPage{}
|
page = &FacebookPage{}
|
||||||
err = x.Get(page, `select * from "public"."facebook_page" where "id" = $1`, id)
|
err = x.Get(page, `select * from "public"."facebook_page" where "id" = $1`, id)
|
||||||
if err != sql.ErrNoRows {
|
if err == sql.ErrNoRows {
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return nil, nil
|
return nil, nil
|
||||||
|
}
|
||||||
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// AddPage -
|
// AddPage -
|
||||||
|
Loading…
Reference in New Issue
Block a user