mirror of
https://github.com/amigan/rustypaste-pretty.git
synced 2024-11-21 11:59:48 -05:00
fix(server): change the config data type for serve route
This commit is contained in:
parent
b12ff1f579
commit
7797180937
1 changed files with 2 additions and 1 deletions
|
@ -29,8 +29,9 @@ async fn index() -> impl Responder {
|
|||
async fn serve(
|
||||
request: HttpRequest,
|
||||
file: web::Path<String>,
|
||||
config: web::Data<Config>,
|
||||
config: web::Data<Arc<Mutex<Config>>>,
|
||||
) -> Result<HttpResponse, Error> {
|
||||
let config = config.lock().expect("cannot acquire config");
|
||||
let path = config.server.upload_path.join(&*file);
|
||||
let mut path = util::glob_match_file(path)?;
|
||||
let mut paste_type = PasteType::File;
|
||||
|
|
Loading…
Reference in a new issue