lohr: upgrade to Rocket v0.5.0-rc.1
This commit is contained in:
parent
7fad5a6a87
commit
b78c486a0e
3 changed files with 44 additions and 66 deletions
|
|
@ -72,7 +72,7 @@ where
|
|||
{
|
||||
type Error = anyhow::Error;
|
||||
|
||||
async fn from_data(request: &'r Request<'_>, data: Data) -> Outcome<Self, Self::Error> {
|
||||
async fn from_data(request: &'r Request<'_>, data: Data<'r>) -> Outcome<'r, Self> {
|
||||
let json_ct = ContentType::new("application", "json");
|
||||
if request.content_type() != Some(&json_ct) {
|
||||
return Outcome::Failure((Status::BadRequest, anyhow!("wrong content type")));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue