commento.js: don't recursively delete comments

This commit is contained in:
Adhityaa Chandrasekar
2019-09-13 18:13:38 -07:00
parent 3ef4a79547
commit ee7875cc1e
6 changed files with 31 additions and 13 deletions

View File

@@ -10,8 +10,9 @@ func commentDelete(commentHex string) error {
}
statement := `
DELETE FROM comments
WHERE commentHex=$1;
UPDATE comments
SET deleted = true, markdown = '[deleted]', html = '[deleted]', commenterHex = 'anonymous'
WHERE commentHex = $1;
`
_, err := db.Exec(statement, commentHex)