use rocket::response::status::BadRequest; use serde_json::json; pub mod artist; pub mod album; pub mod track; pub mod user; type ApiError = BadRequest; type FallibleApiResponse = Result; pub fn api_error(msg: &str) -> ApiError { BadRequest(json!({ "error": msg })) }