CLASSROOMIO-T-113: Settings for landing page
Merge-request: CLASSROOMIO-MR-23 Merged-by: Best Admin <[email protected]> Co-authored-by: Ifeanyi Nwosu <[email protected]> Co-authored-by: Rotimi Best <[email protected]> Merge-request: CLASSROOMIO-MR-50 Merged-by: Best Admin <[email protected]>
This commit is contained in:
committed by
Space Cloud
co-authored by
Ifeanyi Nwosu
Rotimi Best
parent
2b36d0af67
commit
32d0198d3d
@@ -93,12 +93,12 @@ export async function uploadAvatar(courseId: string, avatar: string) {
|
||||
upsert: false
|
||||
});
|
||||
|
||||
if (data && data.Key) {
|
||||
const { publicURL } = supabase.storage.from('avatars').getPublicUrl(filename);
|
||||
if (data) {
|
||||
const { data } = supabase.storage.from('avatars').getPublicUrl(filename);
|
||||
|
||||
if (!publicURL) return;
|
||||
if (!data.publicUrl) return;
|
||||
|
||||
logo = publicURL;
|
||||
logo = data.publicUrl;
|
||||
}
|
||||
|
||||
return logo;
|
||||
@@ -117,12 +117,12 @@ export async function updateCourse(
|
||||
upsert: false
|
||||
});
|
||||
|
||||
if (data && data.Key) {
|
||||
const { publicURL } = supabase.storage.from('avatars').getPublicUrl(filename);
|
||||
if (data) {
|
||||
const { data: response } = supabase.storage.from('avatars').getPublicUrl(filename);
|
||||
|
||||
if (!publicURL) return;
|
||||
if (!response.publicUrl) return;
|
||||
|
||||
course.logo = publicURL;
|
||||
course.logo = response.publicUrl;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user