DEVELOPMENT ENVIRONMENT

~liljamo/deck-builder

be1fddd8fb8f831bf9406982ae46015576a14bd2 — Jonni Liljamo 1 year, 9 months ago b73c71f
fix(api): NewUser -> InsertableUser
1 files changed, 4 insertions(+), 3 deletions(-)

M api/src/models/user.rs
M api/src/models/user.rs => api/src/models/user.rs +4 -3
@@ 13,7 13,7 @@ use uuid::Uuid;

use crate::schema::users;

#[derive(Serialize, Queryable, Insertable)]
#[derive(Serialize, Queryable)]
pub(crate) struct User {
    pub id: Uuid,
    pub created_at: NaiveDateTime,


@@ 22,8 22,9 @@ pub(crate) struct User {
    pub email: String,
}

#[derive(Deserialize)]
pub(crate) struct NewUser {
#[derive(Deserialize, Insertable)]
#[diesel(table_name=users)]
pub(crate) struct InsertableUser {
    pub username: String,
    pub email: String,
    pub password: String,