Fix the deletion route
This commit is contained in:
parent
a4070f971a
commit
b66e8942a9
@ -178,7 +178,7 @@ fn create(blog_name: String, data: LenientForm<NewPostForm>, user: User, conn: D
|
||||
}
|
||||
}
|
||||
|
||||
#[post("/~/<blog_name>/<slug>/delete")]
|
||||
#[get("/~/<blog_name>/<slug>/delete")]
|
||||
fn delete(blog_name: String, slug: String, conn: DbConn, user: User, worker: State<Pool<ThunkWorker<()>>>) -> Redirect {
|
||||
let post = Blog::find_by_fqn(&*conn, blog_name.clone())
|
||||
.and_then(|blog| Post::find_by_slug(&*conn, slug.clone(), blog.id));
|
||||
|
Loading…
Reference in New Issue
Block a user