Skip to content

Commit

Permalink
Fix lodash import
Browse files Browse the repository at this point in the history
  • Loading branch information
nkalupahana committed Mar 16, 2024
1 parent c24d1f4 commit cf08af1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scheduled-services/src/messaging.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { sample } from "underscore";
import { makeInternalRequest } from "./index.js";
import { Request, Response } from "express";
import { getDatabase } from "firebase-admin/database";
import { chunk } from "lodash";
import _ from "lodash";

interface AnyMap {
[key: string]: any;
Expand Down Expand Up @@ -157,7 +157,7 @@ export const logReminder = async (req: Request, res: Response) => {
}

if (messages.length > 0) {
const chunkedMessages = chunk(messages, 500);
const chunkedMessages = _.chunk(messages, 500);
for (const messageChunk of chunkedMessages) {
const messagingResult = await getMessaging().sendAll(messageChunk);
console.log(JSON.stringify(messagingResult));
Expand Down

0 comments on commit cf08af1

Please sign in to comment.