Adding error

add_mark_post_as_read_api
Dessalines 2021-11-23 08:53:19 -05:00
parent c36213162c
commit 4ae3b0c774
1 changed files with 2 additions and 2 deletions

View File

@ -81,7 +81,7 @@ pub async fn mark_post_as_read(
PostRead::mark_as_read(conn, &post_read_form) PostRead::mark_as_read(conn, &post_read_form)
}) })
.await? .await?
.map_err(|_| ApiError::err_plain("couldnt_mark_post_as_read").into()) .map_err(|e| ApiError::err("couldnt_mark_post_as_read", e).into())
} }
pub async fn mark_post_as_unread( pub async fn mark_post_as_unread(
@ -95,7 +95,7 @@ pub async fn mark_post_as_unread(
PostRead::mark_as_unread(conn, &post_read_form) PostRead::mark_as_unread(conn, &post_read_form)
}) })
.await? .await?
.map_err(|_| ApiError::err_plain("couldnt_mark_post_as_read").into()) .map_err(|e| ApiError::err("couldnt_mark_post_as_read", e).into())
} }
pub async fn get_local_user_view_from_jwt( pub async fn get_local_user_view_from_jwt(