mirror of
https://github.com/redlib-org/redlib.git
synced 2025-05-14 14:02:50 +00:00
Handle Unwrapping Errors
This commit is contained in:
parent
5934e34ea0
commit
c046d00060
5 changed files with 32 additions and 24 deletions
|
@ -58,7 +58,7 @@ pub async fn wiki(req: HttpRequest) -> HttpResponse {
|
|||
Ok(res) => {
|
||||
let s = WikiTemplate {
|
||||
sub: sub.to_string(),
|
||||
wiki: rewrite_url(res["data"]["content_html"].as_str().unwrap()),
|
||||
wiki: rewrite_url(res["data"]["content_html"].as_str().unwrap_or_default()),
|
||||
page: page.to_string(),
|
||||
}
|
||||
.render()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue