upd: fungsi delete iddevice yg gagal fcm

This commit is contained in:
2025-07-02 11:49:35 +08:00
parent a8e9217006
commit 44643bafea
6 changed files with 44 additions and 14 deletions

View File

@@ -0,0 +1,17 @@
import { prisma } from "@/module/_global";
export default async function deleteDeviceError({ device }: { device: string[] }) {
try {
const deleteToken = await prisma.tokenDeviceUser.deleteMany({
where: {
token: {
in: device
}
}
});
return { success: true, message: "Success" }
} catch (error) {
console.error(error)
return { success: false, message: "Internal Server Error" }
}
}

View File

@@ -30,6 +30,7 @@ import { funSendWebPush } from "./fun/send_web_push";
import ViewFilterData from "./view/view_filter_kategori_data";
import LayoutModalNew from "./layout/layout_modal_new";
import { funReadPdf } from "./fun/read_pdf";
import deleteDeviceError from "./fun/delete_device_error";
export { WARNA };
export { LayoutLogin };
@@ -68,4 +69,5 @@ export { funViewDir }
export { funSendWebPush }
export { ViewFilterData }
export { LayoutModalNew }
export { funReadPdf }
export { funReadPdf }
export { deleteDeviceError }