mirror of
https://gitlab.com/msrd0/gotham-restful.git
synced 2025-02-23 04:52:28 +00:00
fix doc
This commit is contained in:
parent
1d1682a03d
commit
212fca738b
2 changed files with 3 additions and 3 deletions
|
@ -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");
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
|
@ -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");
|
||||||
# }));
|
# }));
|
||||||
# }
|
# }
|
||||||
```
|
```
|
||||||
|
|
Loading…
Add table
Reference in a new issue