Fix server.rs function name

pull/171/head
spikecodes 3 years ago
parent 90d39b121f
commit f0f484288e
No known key found for this signature in database
GPG Key ID: 004CECFF9B463BCB

@ -171,9 +171,9 @@ impl Server {
parammed.set_params(found.params().to_owned());
// Run the route's function
let yeet = (found.handler().to_owned().to_owned())(parammed);
let func = (found.handler().to_owned().to_owned())(parammed);
async move {
let res: Result<Response<Body>, String> = yeet.await;
let res: Result<Response<Body>, String> = func.await;
// Add default headers to response
res.map(|mut response| {
response.headers_mut().extend(headers);

Loading…
Cancel
Save