API – Event (Mobile) - src/app/api/mobile/event/route.ts - src/app/api/mobile/event/[id]/[status]/route.ts API – Notification (Mobile) - src/app/api/mobile/notification/[id]/route.ts Docs / Experiment - PROMPT-AI.md - zCoba.js ### No issue
27 lines
504 B
JavaScript
27 lines
504 B
JavaScript
const { PrismaClient } = require('@prisma/client')
|
|
|
|
const prisma = new PrismaClient()
|
|
|
|
async function main() {
|
|
const result = await prisma.notifikasi.updateMany({
|
|
where: {
|
|
recipientId: 'cmha7p6yc0000cfoe5w2e7gdr',
|
|
},
|
|
data: {
|
|
isRead: false,
|
|
readAt: null,
|
|
},
|
|
})
|
|
|
|
console.log(`✅ Rows affected: ${result.count}`)
|
|
}
|
|
|
|
main()
|
|
.catch((err) => {
|
|
console.error('❌ Error:', err)
|
|
process.exit(1)
|
|
})
|
|
.finally(async () => {
|
|
await prisma.$disconnect()
|
|
})
|