Some route boilerplate for posts

This commit is contained in:
Jef Roosens 2021-09-28 10:16:20 +02:00
parent 769d7a32de
commit f2a0401601
Signed by: Jef Roosens
GPG key ID: 955C0660072F691F
4 changed files with 30 additions and 2 deletions

View file

@ -6,6 +6,7 @@ pub mod sections;
pub mod tokens;
pub mod users;
pub use posts::{NewPost, PatchPost, Post};
pub use sections::{NewSection, Section};
pub use tokens::{NewRefreshToken, RefreshToken};
pub use users::{NewUser, User};

View file

@ -1,6 +1,6 @@
use chrono::NaiveDate;
use diesel::{insert_into, prelude::*, Insertable, PgConnection, Queryable};
use serde::Deserialize;
use serde::{Deserialize, Serialize};
use uuid::Uuid;
use crate::{
@ -8,7 +8,7 @@ use crate::{
schema::{posts, posts::dsl::*},
};
#[derive(Queryable)]
#[derive(Queryable, Serialize)]
pub struct Post
{
pub id: Uuid,