Browse Source

fixed compiling errors

ignazio 3 years ago
parent
commit
6d9f390e57

+ 2 - 2
runtime-modules/content/src/lib.rs

@@ -770,10 +770,10 @@ decl_module! {
             // check that channel exists
             let channel = Self::ensure_channel_exists(&channel_id)?;
 
-            ensure_actor_authorized_delete_channel::<T>(
+            ensure_actor_authorized_to_delete_channel::<T>(
                 &sender,
                 &actor,
-                &channel,
+                &channel.owner,
             )?;
 
             // check that channel videos are 0

+ 1 - 1
runtime-modules/content/src/permissions/mod.rs

@@ -137,7 +137,7 @@ pub fn ensure_actor_authorized_to_delete_channel<T: Trait>(
             // ensure lead is valid
             ensure_lead_auth_success::<T>(sender)?;
             // ensure curator
-            ensure_channel_is_owned_by_curators::<T>(&channel.owner)?;
+            ensure_channel_is_owned_by_curators::<T>(channel_owner)?;
             Ok(())
         }
         ContentActor::Curator(curator_group_id, curator_id) => {