mirror of
https://github.com/redlib-org/redlib.git
synced 2025-06-07 15:17:47 +00:00
Better subreddit error messages. Closes #131
This commit is contained in:
parent
2f3315dcfc
commit
8034594006
2 changed files with 32 additions and 17 deletions
|
@ -74,7 +74,12 @@ pub async fn page(req: Request<()>) -> tide::Result {
|
|||
prefs: prefs(req),
|
||||
})
|
||||
}
|
||||
Err(msg) => error(req, msg).await,
|
||||
Err(msg) => match msg.as_str() {
|
||||
"quarantined" => error(req, format!("r/{} has been quarantined by Reddit", sub)).await,
|
||||
"private" => error(req, format!("r/{} is a private community", sub)).await,
|
||||
"banned" => error(req, format!("r/{} has been banned from Reddit", sub)).await,
|
||||
_ => error(req, msg).await,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue