upd: api mobile

Deskripsi:
- update api mobile jam komentar pada diskusi umum dan diskusi divisi

No Issues
This commit is contained in:
2025-07-15 15:41:26 +08:00
parent ac5f90b9c1
commit ebb331f617
4 changed files with 51 additions and 59 deletions

View File

@@ -1,4 +1,4 @@
import { prisma } from "@/module/_global";
import { countTime, prisma } from "@/module/_global";
import { funGetUserById } from "@/module/auth";
import { createLogUserMobile } from "@/module/user";
import _ from "lodash";
@@ -80,7 +80,7 @@ export async function GET(request: Request, context: { params: { id: string } })
dataFix = data.map((v: any) => ({
..._.omit(v, ["createdAt", "User",]),
createdAt: moment(v.createdAt).format("lll").replace('pukul', ''),
createdAt: countTime(v.createdAt),
username: v.User.name,
img: v.User.img
}))