mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-12-24 11:51:32 +00:00
Remove commented Site::read
This commit is contained in:
parent
9f47fcbe87
commit
9f61be4035
1 changed files with 0 additions and 19 deletions
|
@ -18,25 +18,6 @@ impl Crud for Site {
|
||||||
type UpdateForm = SiteUpdateForm;
|
type UpdateForm = SiteUpdateForm;
|
||||||
type IdType = SiteId;
|
type IdType = SiteId;
|
||||||
|
|
||||||
/*/// Use SiteView::read_local, or Site::read_from_apub_id instead
|
|
||||||
async fn read<'conn, 'pool: 'conn>(
|
|
||||||
_pool: &'pool mut DbPool<'_>,
|
|
||||||
_site_id: SiteId,
|
|
||||||
) -> Result<Self, Error>
|
|
||||||
where
|
|
||||||
diesel::helper_types::Limit<
|
|
||||||
<Self::Table as diesel::query_dsl::methods::FilterDsl<
|
|
||||||
diesel::dsl::Eq<<Self::Table as diesel::Table>::PrimaryKey, Self::IdType>,
|
|
||||||
>>::Output,
|
|
||||||
>: diesel_async::methods::LoadQuery<'static, crate::utils::DbConn<'pool>, Self>
|
|
||||||
+ Send
|
|
||||||
+ 'static
|
|
||||||
+ Sized,
|
|
||||||
'async_trait: 'conn,
|
|
||||||
{
|
|
||||||
unimplemented!()
|
|
||||||
}*/
|
|
||||||
|
|
||||||
async fn create(pool: &mut DbPool<'_>, form: &Self::InsertForm) -> Result<Self, Error> {
|
async fn create(pool: &mut DbPool<'_>, form: &Self::InsertForm) -> Result<Self, Error> {
|
||||||
let is_new_site = match &form.actor_id {
|
let is_new_site = match &form.actor_id {
|
||||||
Some(id_) => Site::read_from_apub_id(pool, id_).await?.is_none(),
|
Some(id_) => Site::read_from_apub_id(pool, id_).await?.is_none(),
|
||||||
|
|
Loading…
Reference in a new issue