Compare commits
2 Commits
6c0f0e6b04
...
145892104b
Author | SHA1 | Date | |
---|---|---|---|
145892104b | |||
e8d4672176 |
@ -21,7 +21,7 @@ pub struct Notification {
|
|||||||
|
|
||||||
impl Notification {
|
impl Notification {
|
||||||
pub async fn find_by_id(db: &SqlitePool, id: i64) -> Option<Self> {
|
pub async fn find_by_id(db: &SqlitePool, id: i64) -> Option<Self> {
|
||||||
sqlx::query_as!(Self, "SELECT * FROM notification WHERE id like ?", id)
|
sqlx::query_as!(Self, "SELECT id, user_id, message, read_at, created_at, category, link, action_after_reading FROM notification WHERE id like ?", id)
|
||||||
.fetch_one(db)
|
.fetch_one(db)
|
||||||
.await
|
.await
|
||||||
.ok()
|
.ok()
|
||||||
|
Loading…
Reference in New Issue
Block a user