mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-26 03:55:07 +08:00
Fixes #1750
This commit is a fix to issue #1750. As a part of the changes to solve this issue, the following changes have been made - 1. Route registration for static assets has been modified 2. the `mut` keyword on the `scope` has been removed.
This commit is contained in:
parent
81993b6a15
commit
151f691609
@ -147,7 +147,7 @@ pub fn dashboard(config: &mut web::ServiceConfig, enable_frontend: bool) {
|
||||
|
||||
if enable_frontend {
|
||||
let generated = generated::generate();
|
||||
let mut scope = web::scope("/");
|
||||
let scope = web::scope("/");
|
||||
// Generate routes for mini-dashboard assets
|
||||
for (path, resource) in generated.into_iter() {
|
||||
let Resource {
|
||||
@ -159,7 +159,7 @@ pub fn dashboard(config: &mut web::ServiceConfig, enable_frontend: bool) {
|
||||
web::get().to(move || HttpResponse::Ok().content_type(mime_type).body(data)),
|
||||
));
|
||||
} else {
|
||||
scope = scope.service(web::resource(path).route(
|
||||
config.service(web::resource(path).route(
|
||||
web::get().to(move || HttpResponse::Ok().content_type(mime_type).body(data)),
|
||||
));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user