Skip to content

Commit 87de30d

Browse files
committed
Create share notif
1 parent 8176054 commit 87de30d

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

backend/api/src/create-vote-notification.ts renamed to backend/api/src/create-notification.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,24 @@ import {insertNotificationToSupabase} from 'shared/supabase/notifications'
44
import {tryCatch} from "common/util/try-catch";
55
import {Row} from "common/supabase/utils";
66

7+
export const createShareNotifications = async () => {
8+
const createdTime = Date.now();
9+
const id = `share-${createdTime}`
10+
const notification: Notification = {
11+
id,
12+
userId: 'todo',
13+
createdTime: createdTime,
14+
isSeen: false,
15+
sourceType: 'info',
16+
sourceUpdateType: 'created',
17+
sourceSlug: '/contact',
18+
sourceUserAvatarUrl: 'https://firebasestorage.googleapis.com/v0/b/compass-130ba.firebasestorage.app/o/misc%2Ficon-outreach-outstrip-outreach-272151502.jpg?alt=media&token=6d6fcecb-818c-4fca-a8e0-d2d0069b9445',
19+
title: 'Give us tips to reach more people',
20+
sourceText: '250 members already! Tell us where and how we can best share Compass.',
21+
}
22+
return await createNotifications(notification)
23+
}
24+
725
export const createVoteNotifications = async () => {
826
const createdTime = Date.now();
927
const id = `vote-${createdTime}`

0 commit comments

Comments
 (0)