mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-10-01 01:36:12 -04:00
Remove commented Site::read
This commit is contained in:
parent
9f47fcbe87
commit
9f61be4035
@ -18,25 +18,6 @@ impl Crud for Site {
|
||||
type UpdateForm = SiteUpdateForm;
|
||||
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> {
|
||||
let is_new_site = match &form.actor_id {
|
||||
Some(id_) => Site::read_from_apub_id(pool, id_).await?.is_none(),
|
||||
|
Loading…
Reference in New Issue
Block a user