diff --git a/src/server/api/routers/parcel.ts b/src/server/api/routers/parcel.ts index 1e98123..42abbf6 100755 --- a/src/server/api/routers/parcel.ts +++ b/src/server/api/routers/parcel.ts @@ -7,7 +7,7 @@ import { ParcelTypeSchema, } from "~/utils/constant"; import { BORROWING_STATUS, PARCEL_TYPE } from "@prisma/client"; -import { sendMessage } from "~/utils/function"; +import { sendLineNotificaion } from "~/utils/function"; /** * TRPC Router for handling parcel-related operations. @@ -176,7 +176,7 @@ export const parcelRouter = createTRPCRouter({ const student = await tx.student.findFirst({ where: { student_id: input.student_id }, }); - await sendMessage( + await sendLineNotificaion( student?.name ?? "", input.startDate?.toDateString() ?? "", ); diff --git a/src/utils/function.ts b/src/utils/function.ts index 816575e..3bfe8d0 100755 --- a/src/utils/function.ts +++ b/src/utils/function.ts @@ -55,7 +55,7 @@ export const decrypt = async (token: string) => { * @returns {Promise} A promise that resolves to the decrypted data if the token is valid, * or an error object if the token is invalid. */ -export const sendMessage = async ( +export const sendLineNotificaion = async ( student_name: string, start_date: string, ): Promise => {