1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-08-31 00:50:20 +02:00

fix nested resources

This commit is contained in:
Nikolay Kim
2019-03-06 19:27:18 -08:00
parent 244fff9e0a
commit 60c048c8cd
3 changed files with 7 additions and 11 deletions

View File

@@ -262,12 +262,11 @@ where
} else {
Some(self.guards)
};
let rdef = if config.is_root() {
ResourceDef::root_prefix(&self.rdef)
} else {
ResourceDef::prefix(&self.rdef)
};
config.register_service(rdef, guards, self.endpoint)
config.register_service(
ResourceDef::root_prefix(&self.rdef),
guards,
self.endpoint,
)
}
}