Categorize routes and refactor error handlers

This commit is contained in:
spikecodes 2021-01-13 19:53:52 -08:00
parent dd027bff4b
commit 0bf5576427
8 changed files with 100 additions and 91 deletions

View file

@ -57,7 +57,7 @@ pub async fn item(req: HttpRequest) -> HttpResponse {
HttpResponse::Ok().content_type("text/html").body(s)
}
// If the Reddit API returns an error, exit and send error page to user
Err(msg) => error(msg.to_string()).await,
Err(msg) => error(msg).await,
}
}