Skip to content

Commit 74c1950

Browse files
Add SMS notification when a reminder is already set.
1 parent 4894fd1 commit 74c1950

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

pages/api/sms/[instance]/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ const handleText = async (req:NextApiRequest, res:NextApiResponse, input:string,
137137
let c = cases[0];
138138

139139
// check if a reminder is already active
140-
const reminders = ReminderDao.find({
140+
const reminders = await ReminderDao.find({
141141
active: true,
142142
uid: c.uid,
143143
number: c.number,
@@ -207,7 +207,7 @@ const handleText = async (req:NextApiRequest, res:NextApiResponse, input:string,
207207
if (response === parseInt(response).toString() && index >= 0 && index < cases.length) {
208208
let c = cases[index];
209209
// check if a reminder is already active
210-
const reminders = ReminderDao.find({
210+
const reminders = await ReminderDao.find({
211211
active: true,
212212
uid: c.uid,
213213
number: c.number,

0 commit comments

Comments
 (0)