mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-12-25 12:21:31 +00:00
remove debug log for post creation
This commit is contained in:
parent
cca3a52856
commit
eab4edc246
1 changed files with 0 additions and 2 deletions
|
@ -111,13 +111,11 @@ impl Crud<PostForm> for Post {
|
||||||
|
|
||||||
fn create(conn: &PgConnection, new_post: &PostForm) -> Result<Self, Error> {
|
fn create(conn: &PgConnection, new_post: &PostForm) -> Result<Self, Error> {
|
||||||
use crate::schema::post::dsl::*;
|
use crate::schema::post::dsl::*;
|
||||||
dbg!(&new_post);
|
|
||||||
insert_into(post).values(new_post).get_result::<Self>(conn)
|
insert_into(post).values(new_post).get_result::<Self>(conn)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn update(conn: &PgConnection, post_id: i32, new_post: &PostForm) -> Result<Self, Error> {
|
fn update(conn: &PgConnection, post_id: i32, new_post: &PostForm) -> Result<Self, Error> {
|
||||||
use crate::schema::post::dsl::*;
|
use crate::schema::post::dsl::*;
|
||||||
dbg!(&new_post);
|
|
||||||
diesel::update(post.find(post_id))
|
diesel::update(post.find(post_id))
|
||||||
.set(new_post)
|
.set(new_post)
|
||||||
.get_result::<Self>(conn)
|
.get_result::<Self>(conn)
|
||||||
|
|
Loading…
Reference in a new issue