Run cargo fmt
Signed-off-by: baalajimaestro <me@baalajimaestro.me>
This commit is contained in:
parent
3c8aee3c09
commit
9eadd3b9c5
1 changed files with 7 additions and 2 deletions
|
@ -5,10 +5,10 @@ use actix_web::{
|
||||||
web::{Data, Query},
|
web::{Data, Query},
|
||||||
App, HttpResponse, HttpServer, Responder,
|
App, HttpResponse, HttpServer, Responder,
|
||||||
};
|
};
|
||||||
|
use base64::{engine::general_purpose, Engine};
|
||||||
use mime::TEXT_HTML;
|
use mime::TEXT_HTML;
|
||||||
use reqwest::{header::HeaderMap, Client};
|
use reqwest::{header::HeaderMap, Client};
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
use base64::{Engine, engine::general_purpose};
|
|
||||||
use std::env;
|
use std::env;
|
||||||
use tera::{Context, Tera};
|
use tera::{Context, Tera};
|
||||||
|
|
||||||
|
@ -54,7 +54,12 @@ async fn paste_render(data: Data<Template>, paste: Query<Paste>) -> impl Respond
|
||||||
paste_content = "Paste ID Invalid".to_string();
|
paste_content = "Paste ID Invalid".to_string();
|
||||||
} else {
|
} else {
|
||||||
let resp_struct: ResponseJSON = serde_json::from_str(&response_json).unwrap();
|
let resp_struct: ResponseJSON = serde_json::from_str(&response_json).unwrap();
|
||||||
paste_content = String::from_utf8(general_purpose::STANDARD.decode(resp_struct.content).unwrap()).unwrap();
|
paste_content = String::from_utf8(
|
||||||
|
general_purpose::STANDARD
|
||||||
|
.decode(resp_struct.content)
|
||||||
|
.unwrap(),
|
||||||
|
)
|
||||||
|
.unwrap();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
paste_content = "Provide a Paste ID".to_string();
|
paste_content = "Provide a Paste ID".to_string();
|
||||||
|
|
Loading…
Reference in a new issue