Merge pull request #412 from bipproduction/amalia/11-mar-25
Amalia/11 mar 25
This commit is contained in:
@@ -144,7 +144,7 @@ export async function POST(request: Request) {
|
||||
..._.omit(v, ["idUser", "name", "img"]),
|
||||
idUserTo: v.idUser,
|
||||
idUserFrom: userId,
|
||||
category: 'discussion-general',
|
||||
category: 'discussion',
|
||||
idContent: data.id,
|
||||
title: 'Diskusi Umum Baru',
|
||||
desc: 'Terdapat diskusi umum baru. Silahkan periksa detailnya.'
|
||||
@@ -170,7 +170,7 @@ export async function POST(request: Request) {
|
||||
dataNotif.push({
|
||||
idUserTo: perbekel?.id,
|
||||
idUserFrom: userId,
|
||||
category: 'discussion-general',
|
||||
category: 'discussion',
|
||||
idContent: data.id,
|
||||
title: 'Diskusi Umum Baru',
|
||||
desc: 'Terdapat diskusi umum baru. Silahkan periksa detailnya.'
|
||||
|
||||
@@ -2,7 +2,7 @@ import { NextResponse } from "next/server";
|
||||
|
||||
export async function GET(request: Request) {
|
||||
try {
|
||||
return NextResponse.json({ success: true, version: "1.2.5", tahap: "beta", update: "-fix api fitur divisi non aktif, -fix api tampil file/dokumen yg telah dihapus" }, { status: 200 });
|
||||
return NextResponse.json({ success: true, version: "1.2.6", tahap: "beta", update: "-fix categori notifikasi diskusi umum" }, { status: 200 });
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
return NextResponse.json({ success: false, version: "Gagal mendapatkan version, coba lagi nanti (error: 500)", reason: (error as Error).message, }, { status: 500 });
|
||||
|
||||
@@ -88,13 +88,13 @@ export default function ListDiscussionGeneral() {
|
||||
|
||||
|
||||
useShallowEffect(() => {
|
||||
if (notifLoadPage.get().category == 'discussion-general' && notifLoadPage.get().load == true) {
|
||||
if (notifLoadPage.get().category == 'discussion' && notifLoadPage.get().load == true) {
|
||||
setRefresh(true)
|
||||
}
|
||||
}, [notifLoadPage.get().load])
|
||||
|
||||
useShallowEffect(() => {
|
||||
if (dataRealTime && dataRealTime.some((i: any) => i.category == 'discussion-general')) {
|
||||
if (dataRealTime && dataRealTime.some((i: any) => i.category == 'discussion')) {
|
||||
setRefresh(true)
|
||||
}
|
||||
}, [dataRealTime])
|
||||
|
||||
Reference in New Issue
Block a user