mirror of
https://github.com/ntex-rs/ntex.git
synced 2025-04-07 06:47:39 +03:00
propogate app config with http request; add tests for url_for
This commit is contained in:
parent
c0ce7f0bae
commit
54678308d0
18 changed files with 397 additions and 215 deletions
|
@ -31,7 +31,7 @@ pub fn get(args: TokenStream, input: TokenStream) -> TokenStream {
|
|||
struct #name;
|
||||
|
||||
impl<P: 'static> actix_web::dev::HttpServiceFactory<P> for #name {
|
||||
fn register(self, config: &mut actix_web::dev::AppConfig<P>) {
|
||||
fn register(self, config: &mut actix_web::dev::ServiceConfig<P>) {
|
||||
#ast
|
||||
actix_web::dev::HttpServiceFactory::register(
|
||||
actix_web::Resource::new(#path)
|
||||
|
@ -68,7 +68,7 @@ pub fn post(args: TokenStream, input: TokenStream) -> TokenStream {
|
|||
struct #name;
|
||||
|
||||
impl<P: 'static> actix_web::dev::HttpServiceFactory<P> for #name {
|
||||
fn register(self, config: &mut actix_web::dev::AppConfig<P>) {
|
||||
fn register(self, config: &mut actix_web::dev::ServiceConfig<P>) {
|
||||
#ast
|
||||
actix_web::dev::HttpServiceFactory::register(
|
||||
actix_web::Resource::new(#path)
|
||||
|
@ -105,7 +105,7 @@ pub fn put(args: TokenStream, input: TokenStream) -> TokenStream {
|
|||
struct #name;
|
||||
|
||||
impl<P: 'static> actix_web::dev::HttpServiceFactory<P> for #name {
|
||||
fn register(self, config: &mut actix_web::dev::AppConfig<P>) {
|
||||
fn register(self, config: &mut actix_web::dev::ServiceConfig<P>) {
|
||||
#ast
|
||||
actix_web::dev::HttpServiceFactory::register(
|
||||
actix_web::Resource::new(#path)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue