Tried to add MirageJS but failed

This commit is contained in:
Jef Roosens 2021-09-23 15:30:39 +02:00
parent 6d83c18036
commit 548dd0d022
Signed by: Jef Roosens
GPG key ID: 955C0660072F691F
8 changed files with 681 additions and 373 deletions

View file

@ -1,5 +1,3 @@
//! Handles all posts-related database operations.
use chrono::NaiveDate;
use diesel::{insert_into, prelude::*, Insertable, PgConnection, Queryable};
use uuid::Uuid;
@ -9,7 +7,6 @@ use crate::{
schema::{posts, posts::dsl::*},
};
/// Represents a post contained within the database.
#[derive(Queryable)]
pub struct Post
{
@ -20,7 +17,6 @@ pub struct Post
pub content: String,
}
/// Represents a new post to be added to the database.
#[derive(Insertable)]
#[table_name = "posts"]
pub struct NewPost

View file

@ -23,7 +23,7 @@ pub struct Section
/// A new section to be added into the database.
#[derive(Deserialize, Insertable)]
#[table_name = "sections"]
// #[serde(rename_all = "camelCase")]
#[serde(rename_all = "camelCase")]
pub struct NewSection
{
title: String,