Function backend::routes::user::get_collection [−][src]
pub async fn get_collection(
db: Connection<PgDb>,
auth: Auth,
page: Option<usize>
) -> (Status, Result<Json<Vec<UserGetCollectionResponse>>, Json<ErrorResponse>>)Expand description
Get Collection
Show posts in user’s collection.
Parameters
Auth: Authenticated userConnection<PgDb>: Postgres connectionOption<usize>: page number, default value 0
Returns
Status: HTTP statusJson<Vec<UserGetCollectionResponse>>: Json of Vec, including struct Post, a bool showing if the posts in collection are updated.
Errors
ErrorResponse: Error messageErrorCode::DatabaseErr