1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-07-01 00:44:26 +02:00

propogate app config with http request; add tests for url_for

This commit is contained in:
Nikolay Kim
2019-03-09 14:06:24 -08:00
parent c0ce7f0bae
commit 54678308d0
18 changed files with 397 additions and 215 deletions

View File

@ -10,7 +10,7 @@ use actix_service::{
use futures::future::{ok, Either, Future, FutureResult};
use futures::{Async, Poll};
use crate::dev::{AppConfig, HttpServiceFactory};
use crate::dev::{HttpServiceFactory, ServiceConfig};
use crate::guard::Guard;
use crate::resource::Resource;
use crate::rmap::ResourceMap;
@ -237,7 +237,7 @@ where
InitError = (),
> + 'static,
{
fn register(self, config: &mut AppConfig<P>) {
fn register(self, config: &mut ServiceConfig<P>) {
// update default resource if needed
if self.default.borrow().is_none() {
*self.default.borrow_mut() = Some(config.default_service());