Skip to content

Commit b83e720

Browse files
authored
Remove redundant deviceId 2nd param
1 parent b846f35 commit b83e720

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/routes.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ export async function appRoutes(app: FastifyInstance) {
289289
id: dayHabit.id,
290290
},
291291
});
292-
await updateStreak(id, deviceId, false);
292+
await updateStreak(id, false);
293293
} else {
294294
await prisma.dayHabit.create({
295295
data: {
@@ -298,7 +298,7 @@ export async function appRoutes(app: FastifyInstance) {
298298
deviceId,
299299
},
300300
});
301-
await updateStreak(id, deviceId, true);
301+
await updateStreak(id, true);
302302
}
303303

304304
reply
@@ -365,9 +365,8 @@ export async function appRoutes(app: FastifyInstance) {
365365

366366
async function updateStreak(
367367
habitId: string,
368-
deviceId: string,
369368
completed: boolean
370-
) {
369+
): Promise<void> {
371370
const habit = await prisma.habit.findUnique({
372371
where: { id: habitId },
373372
include: {

0 commit comments

Comments
 (0)