server: Merge insert and update methods and routes

This commit is contained in:
Elias Projahn 2020-11-28 00:30:12 +01:00
parent 319b1505da
commit 3b8ed4bdb1
11 changed files with 611 additions and 662 deletions

View file

@ -5,6 +5,7 @@ extern crate diesel;
use actix_web::{App, HttpServer};
mod database;
mod error;
mod routes;
use routes::*;
@ -27,9 +28,9 @@ async fn main() -> std::io::Result<()> {
.service(put_user)
.service(get_user)
.service(get_person)
.service(post_person)
.service(put_person)
.service(update_person)
.service(get_persons)
.service(delete_person)
});
server.bind("127.0.0.1:8087")?.run().await