domain_delete.go: delete entries from pages on domain delete
This commit is contained in:
parent
6d3f8171e5
commit
0c6ccdc0a1
@ -60,6 +60,16 @@ func domainDelete(domain string) error {
|
|||||||
return errorInternal
|
return errorInternal
|
||||||
}
|
}
|
||||||
|
|
||||||
|
statement = `
|
||||||
|
DELETE FROM pages
|
||||||
|
WHERE pages.domain = $1;
|
||||||
|
`
|
||||||
|
_, err = db.Exec(statement, domain)
|
||||||
|
if err != nil {
|
||||||
|
logger.Errorf(statement, domain)
|
||||||
|
return errorInternal
|
||||||
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user