mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-12-23 19:31:33 +00:00
* Fixing updated form fields. Fixes #2724 * Fix import.
This commit is contained in:
parent
9d7009c772
commit
956d0aa52f
3 changed files with 6 additions and 2 deletions
|
@ -23,6 +23,7 @@ use lemmy_db_schema::{
|
||||||
local_site::LocalSite,
|
local_site::LocalSite,
|
||||||
},
|
},
|
||||||
traits::Crud,
|
traits::Crud,
|
||||||
|
utils::naive_now,
|
||||||
};
|
};
|
||||||
use lemmy_db_views::structs::CommentView;
|
use lemmy_db_views::structs::CommentView;
|
||||||
use lemmy_utils::{
|
use lemmy_utils::{
|
||||||
|
@ -92,6 +93,7 @@ impl PerformCrud for EditComment {
|
||||||
.content(content_slurs_removed)
|
.content(content_slurs_removed)
|
||||||
.distinguished(data.distinguished)
|
.distinguished(data.distinguished)
|
||||||
.language_id(data.language_id)
|
.language_id(data.language_id)
|
||||||
|
.updated(Some(Some(naive_now())))
|
||||||
.build();
|
.build();
|
||||||
let updated_comment = Comment::update(context.pool(), comment_id, &form)
|
let updated_comment = Comment::update(context.pool(), comment_id, &form)
|
||||||
.await
|
.await
|
||||||
|
|
|
@ -14,7 +14,7 @@ use lemmy_db_schema::{
|
||||||
local_site::LocalSite,
|
local_site::LocalSite,
|
||||||
},
|
},
|
||||||
traits::Crud,
|
traits::Crud,
|
||||||
utils::{diesel_option_overwrite, diesel_option_overwrite_to_url},
|
utils::{diesel_option_overwrite, diesel_option_overwrite_to_url, naive_now},
|
||||||
};
|
};
|
||||||
use lemmy_db_views_actor::structs::CommunityModeratorView;
|
use lemmy_db_views_actor::structs::CommunityModeratorView;
|
||||||
use lemmy_utils::{error::LemmyError, utils::check_slurs_opt, ConnectionId};
|
use lemmy_utils::{error::LemmyError, utils::check_slurs_opt, ConnectionId};
|
||||||
|
@ -70,6 +70,7 @@ impl PerformCrud for EditCommunity {
|
||||||
.banner(banner)
|
.banner(banner)
|
||||||
.nsfw(data.nsfw)
|
.nsfw(data.nsfw)
|
||||||
.posting_restricted_to_mods(data.posting_restricted_to_mods)
|
.posting_restricted_to_mods(data.posting_restricted_to_mods)
|
||||||
|
.updated(Some(Some(naive_now())))
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
let community_id = data.community_id;
|
let community_id = data.community_id;
|
||||||
|
|
|
@ -19,7 +19,7 @@ use lemmy_db_schema::{
|
||||||
post::{Post, PostUpdateForm},
|
post::{Post, PostUpdateForm},
|
||||||
},
|
},
|
||||||
traits::Crud,
|
traits::Crud,
|
||||||
utils::diesel_option_overwrite,
|
utils::{diesel_option_overwrite, naive_now},
|
||||||
};
|
};
|
||||||
use lemmy_utils::{
|
use lemmy_utils::{
|
||||||
error::LemmyError,
|
error::LemmyError,
|
||||||
|
@ -101,6 +101,7 @@ impl PerformCrud for EditPost {
|
||||||
.embed_video_url(embed_video_url)
|
.embed_video_url(embed_video_url)
|
||||||
.language_id(data.language_id)
|
.language_id(data.language_id)
|
||||||
.thumbnail_url(Some(thumbnail_url))
|
.thumbnail_url(Some(thumbnail_url))
|
||||||
|
.updated(Some(Some(naive_now())))
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
let post_id = data.post_id;
|
let post_id = data.post_id;
|
||||||
|
|
Loading…
Reference in a new issue