diff --git a/src/db/posts.rs b/src/db/posts.rs index 2486c08..163902e 100644 --- a/src/db/posts.rs +++ b/src/db/posts.rs @@ -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 diff --git a/src/db/sections.rs b/src/db/sections.rs index ca8956b..b429c85 100644 --- a/src/db/sections.rs +++ b/src/db/sections.rs @@ -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, diff --git a/web/package.json b/web/package.json index 6dfbfa6..b1070aa 100644 --- a/web/package.json +++ b/web/package.json @@ -7,7 +7,9 @@ "build": "astro build" }, "devDependencies": { + "@astrojs/renderer-svelte": "^0.1.1", "astro": "0.19.0-next.2", - "@astrojs/renderer-svelte": "^0.1.1" + "miragejs": "^0.1.41", + "typescript": "^4.4.3" } } diff --git a/web/src/components/MirageTest.svelte b/web/src/components/MirageTest.svelte new file mode 100644 index 0000000..ac3676b --- /dev/null +++ b/web/src/components/MirageTest.svelte @@ -0,0 +1,19 @@ + + +