mirror of
https://github.com/actix/examples
synced 2024-11-23 22:41:07 +01:00
chore: fmt
This commit is contained in:
parent
de0411ca31
commit
db35977fbe
@ -145,12 +145,10 @@ async fn main() -> std::io::Result<()> {
|
||||
let pool = config.pg.create_pool(None, NoTls).unwrap();
|
||||
|
||||
let server = HttpServer::new(move || {
|
||||
App::new()
|
||||
.app_data(web::Data::new(pool.clone()))
|
||||
.service(
|
||||
App::new().app_data(web::Data::new(pool.clone())).service(
|
||||
web::resource("/users")
|
||||
.route(web::post().to(add_user))
|
||||
.route(web::get().to(get_users))
|
||||
.route(web::get().to(get_users)),
|
||||
)
|
||||
})
|
||||
.bind(config.server_addr.clone())?
|
||||
|
Loading…
Reference in New Issue
Block a user