fix check condition
This commit is contained in:
parent
b495dee7d4
commit
c2b96c69d1
@ -33,11 +33,11 @@ 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 -
|
||||||
func (p *FacebookPage) AddPage() (err error) {
|
func (p *FacebookPage) AddPage() (err error) {
|
||||||
|
Loading…
Reference in New Issue
Block a user