add fallback to url generating 404
This commit is contained in:
+6
-1
@@ -1,7 +1,7 @@
|
||||
use activitystreams_types::collection::OrderedCollection;
|
||||
use rocket::{
|
||||
request::Form,
|
||||
response::Redirect
|
||||
response::{Redirect, Flash}
|
||||
};
|
||||
use rocket_contrib::Template;
|
||||
use serde_json;
|
||||
@@ -53,6 +53,11 @@ fn new(user: User) -> Template {
|
||||
}))
|
||||
}
|
||||
|
||||
#[get("/blogs/new", rank = 2)]
|
||||
fn new_auth() -> Flash<Redirect>{
|
||||
utils::requires_login("You need to be logged in order to create a new blog", "/blogs/new")
|
||||
}
|
||||
|
||||
#[derive(FromForm)]
|
||||
struct NewBlogForm {
|
||||
pub title: String
|
||||
|
||||
Reference in New Issue
Block a user