1
0
mirror of https://github.com/actix/examples synced 2024-11-23 22:41:07 +01:00

chore: fmt

This commit is contained in:
Rob Ede 2023-07-22 22:29:35 +01:00
parent de0411ca31
commit db35977fbe
No known key found for this signature in database
GPG Key ID: 97C636207D3EF933

View File

@ -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())?