Skip to content

Commit

Permalink
Merge branch 'staging'
Browse files Browse the repository at this point in the history
  • Loading branch information
jonassimoen committed May 21, 2024
2 parents e2f5b71 + dbe421a commit fbe8a44
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/controllers/Notification.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { app } from "../../api/index"
import { prisma } from "../db/client";

export const RegisterTokenHandler = async(req: any, rep: any) => {
getMessaging(app).subscribeToTopic(req.body.token, "edd-app");
getMessaging(app).subscribeToTopic(req.body.token, `edd-app-${process.env.ENV}`);
const token = await prisma.notificationToken.create({
data: {
token: req.body.token,
Expand All @@ -21,7 +21,7 @@ export const RegisterTokenHandler = async(req: any, rep: any) => {
export const PushNotificationHandler = async(req: any, rep: any) => {

const id = await getMessaging(app).send({
topic: 'edd-app',
topic: `edd-app-${process.env.ENV}`,
webpush: {
notification: {
title: req.body.title || "",
Expand Down

0 comments on commit fbe8a44

Please sign in to comment.