aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/handlers/notes.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/handlers/notes.rs b/src/handlers/notes.rs
index f49ee39..42f89ad 100644
--- a/src/handlers/notes.rs
+++ b/src/handlers/notes.rs
@@ -75,7 +75,7 @@ impl Into<xe_jsonfeed::Item> for Note {
pub async fn index() -> super::Result {
let conn = crate::establish_connection()?;
- let mut stmt = conn.prepare("SELECT id, content, content_html, created_at, updated_at, deleted_at, reply_to FROM notes ORDER BY id DESC LIMIT 25")?;
+ let mut stmt = conn.prepare("SELECT id, content, content_html, created_at, updated_at, deleted_at, reply_to FROM notes WHERE deleted_at IS NULL ORDER BY id DESC LIMIT 25")?;
let notes = stmt
.query_map(params![], |row| {
Ok(Note {
@@ -101,7 +101,7 @@ pub async fn index() -> super::Result {
pub async fn feed() -> super::Result<Json<xe_jsonfeed::Feed>> {
let conn = crate::establish_connection()?;
- let mut stmt = conn.prepare("SELECT id, content, content_html, created_at, updated_at, deleted_at, reply_to FROM notes ORDER BY id DESC LIMIT 25")?;
+ let mut stmt = conn.prepare("SELECT id, content, content_html, created_at, updated_at, deleted_at, reply_to FROM notes WHERE deleted_at IS NULL ORDER BY id DESC LIMIT 25")?;
let notes = stmt
.query_map(params![], |row| {
Ok(Note {