1
0
Fork 0
mirror of https://gitlab.com/msrd0/gotham-restful.git synced 2025-02-23 04:52:28 +00:00
This commit is contained in:
Dominic 2020-04-05 22:18:31 +02:00
parent 1d1682a03d
commit 212fca738b
Signed by: msrd0
GPG key ID: DCC8C247452E98F9
2 changed files with 3 additions and 3 deletions

View file

@ -146,7 +146,7 @@ fn main() {
); );
let (chain, pipelines) = single_pipeline(new_pipeline().add(auth).build()); let (chain, pipelines) = single_pipeline(new_pipeline().add(auth).build());
gotham::start("127.0.0.1:8080", build_router(chain, pipelines, |route| { gotham::start("127.0.0.1:8080", build_router(chain, pipelines, |route| {
route.resource::<AuthResource, _>("auth"); route.resource::<AuthResource>("auth");
})); }));
} }
``` ```

View file

@ -50,7 +50,7 @@ fn read_all(_state: &mut State) -> Success<Vec<User>> {
/// Our main method. /// Our main method.
fn main() { fn main() {
gotham::start("127.0.0.1:8080", build_simple_router(|route| { gotham::start("127.0.0.1:8080", build_simple_router(|route| {
route.resource::<UsersResource, _>("users"); route.resource::<UsersResource>("users");
})); }));
} }
``` ```
@ -76,7 +76,7 @@ fn create(_state : &mut State, body : RawImage) -> Raw<Vec<u8>> {
} }
# fn main() { # fn main() {
# gotham::start("127.0.0.1:8080", build_simple_router(|route| { # gotham::start("127.0.0.1:8080", build_simple_router(|route| {
# route.resource::<ImageResource, _>("image"); # route.resource::<ImageResource>("image");
# })); # }));
# } # }
``` ```