1
0
mirror of https://github.com/actix/examples synced 2024-11-23 22:41:07 +01:00
This commit is contained in:
Roman Frołow 2020-01-12 13:11:12 +01:00 committed by Yuki Okushi
parent 5cbaa75e21
commit 9c34ded6fd
7 changed files with 13 additions and 4 deletions

View File

@ -18,8 +18,7 @@ env_logger = "0.6"
futures = "0.3.1"
r2d2 = "0.8"
lazy_static = "1.3.0"
serde = "1.0"
serde_derive = "1.0"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
sparkpost = "0.5.2"
uuid = { version = "0.7", features = ["serde", "v4"] }

View File

@ -28,3 +28,11 @@
Read the full tutorial series on [gill.net.in](https://gill.net.in)
- [Auth Web Microservice with rust using Actix-Web 1.0 - Complete Tutorial](https://gill.net.in/posts/auth-microservice-rust-actix-web1.0-diesel-complete-tutorial/)
## Dependencies
On Ubuntu 19.10:
```
sudo apt install libclang-dev libpq-dev
```

View File

@ -8,6 +8,7 @@ use actix_web::{
use diesel::prelude::*;
use diesel::PgConnection;
use futures::future::Future;
use serde::Deserialize;
use crate::errors::ServiceError;
use crate::models::{Pool, SlimUser, User};

View File

@ -1,5 +1,6 @@
use actix_web::{error::BlockingError, web, HttpResponse};
use diesel::{prelude::*, PgConnection};
use serde::Deserialize;
use crate::email_service::send_invitation;
use crate::errors::ServiceError;

View File

@ -1,7 +1,5 @@
#[macro_use]
extern crate diesel;
#[macro_use]
extern crate serde_derive;
use actix_identity::{CookieIdentityPolicy, IdentityService};
use actix_web::{middleware, web, App, HttpServer};

View File

@ -1,5 +1,6 @@
use super::schema::*;
use diesel::{r2d2::ConnectionManager, PgConnection};
use serde::{Deserialize, Serialize};
// type alias to use in multiple places
pub type Pool = r2d2::Pool<ConnectionManager<PgConnection>>;

View File

@ -1,5 +1,6 @@
use actix_web::{error::BlockingError, web, HttpResponse};
use diesel::prelude::*;
use serde::Deserialize;
use crate::errors::ServiceError;
use crate::models::{Invitation, Pool, SlimUser, User};