domain_delete.go: delete entries from pages on domain delete

This commit is contained in:
Adhityaa Chandrasekar 2018-10-08 02:34:03 -04:00
parent 6d3f8171e5
commit 0c6ccdc0a1

View File

@ -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
} }