mirror of
https://github.com/actix/examples
synced 2024-11-23 22:41:07 +01:00
Use derive feature from serde https://github.com/serde-rs/serde/issues/1441#issuecomment-445481084 (#230)
This commit is contained in:
parent
5cbaa75e21
commit
9c34ded6fd
@ -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"] }
|
||||
|
@ -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
|
||||
```
|
||||
|
@ -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};
|
||||
|
@ -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;
|
||||
|
@ -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};
|
||||
|
@ -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>>;
|
||||
|
@ -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};
|
||||
|
Loading…
Reference in New Issue
Block a user