Function backend::routes::user::get_burrow [−][src]
pub async fn get_burrow(
db: Connection<PgDb>,
auth: Auth
) -> (Status, Result<Json<Vec<BurrowMetadata>>, Json<ErrorResponse>>)Expand description
Get Burrow
Show burrows that belongs to current user, discarded burrows won’t be shown here.
Parameters
Auth: Authenticated userConnection<PgDb>: Postgres connection
Returns
Status: HTTP statusJson<Vec<BurrowMetadata>>: Json of Vec, including id, title, description, amount-of-post of selected burrows
Errors
ErrorResponse: Error messageErrorCode::UserNotExistErrorCode::DatabaseErr