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"]),
|
..._.omit(v, ["idUser", "name", "img"]),
|
||||||
idUserTo: v.idUser,
|
idUserTo: v.idUser,
|
||||||
idUserFrom: userId,
|
idUserFrom: userId,
|
||||||
category: 'discussion-general',
|
category: 'discussion',
|
||||||
idContent: data.id,
|
idContent: data.id,
|
||||||
title: 'Diskusi Umum Baru',
|
title: 'Diskusi Umum Baru',
|
||||||
desc: 'Terdapat diskusi umum baru. Silahkan periksa detailnya.'
|
desc: 'Terdapat diskusi umum baru. Silahkan periksa detailnya.'
|
||||||
@@ -170,7 +170,7 @@ export async function POST(request: Request) {
|
|||||||
dataNotif.push({
|
dataNotif.push({
|
||||||
idUserTo: perbekel?.id,
|
idUserTo: perbekel?.id,
|
||||||
idUserFrom: userId,
|
idUserFrom: userId,
|
||||||
category: 'discussion-general',
|
category: 'discussion',
|
||||||
idContent: data.id,
|
idContent: data.id,
|
||||||
title: 'Diskusi Umum Baru',
|
title: 'Diskusi Umum Baru',
|
||||||
desc: 'Terdapat diskusi umum baru. Silahkan periksa detailnya.'
|
desc: 'Terdapat diskusi umum baru. Silahkan periksa detailnya.'
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import { NextResponse } from "next/server";
|
|||||||
|
|
||||||
export async function GET(request: Request) {
|
export async function GET(request: Request) {
|
||||||
try {
|
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) {
|
} catch (error) {
|
||||||
console.error(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 });
|
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(() => {
|
useShallowEffect(() => {
|
||||||
if (notifLoadPage.get().category == 'discussion-general' && notifLoadPage.get().load == true) {
|
if (notifLoadPage.get().category == 'discussion' && notifLoadPage.get().load == true) {
|
||||||
setRefresh(true)
|
setRefresh(true)
|
||||||
}
|
}
|
||||||
}, [notifLoadPage.get().load])
|
}, [notifLoadPage.get().load])
|
||||||
|
|
||||||
useShallowEffect(() => {
|
useShallowEffect(() => {
|
||||||
if (dataRealTime && dataRealTime.some((i: any) => i.category == 'discussion-general')) {
|
if (dataRealTime && dataRealTime.some((i: any) => i.category == 'discussion')) {
|
||||||
setRefresh(true)
|
setRefresh(true)
|
||||||
}
|
}
|
||||||
}, [dataRealTime])
|
}, [dataRealTime])
|
||||||
|
|||||||
Reference in New Issue
Block a user