fix: feed not sending notification
This commit is contained in:
@@ -1,12 +1,17 @@
|
||||
import { json } from '@sveltejs/kit';
|
||||
import { getSupabase } from '$lib/utils/functions/supabase';
|
||||
import { getServerSupabase } from '$lib/utils/functions/supabase.server';
|
||||
import { getFeedForNotification } from '$lib/utils/services/newsfeed/index';
|
||||
import sendEmail from '$mail/sendEmail';
|
||||
|
||||
const supabase = getSupabase();
|
||||
const supabase = getServerSupabase();
|
||||
|
||||
const sendEmailNotification = async (feedId: string, authorId: string, comment?: string) => {
|
||||
const feed = await getFeedForNotification(feedId, authorId);
|
||||
const feed = await getFeedForNotification({
|
||||
supabase,
|
||||
feedId,
|
||||
authorId
|
||||
});
|
||||
console.log({ feed });
|
||||
if (!feed) return;
|
||||
|
||||
const postLink = `https://${feed.org.siteName}.classroomio.com/courses/${feed.courseId}?feedId=${feed.id}`;
|
||||
|
||||
Reference in New Issue
Block a user