Compare commits

...

3 Commits

Author SHA1 Message Date
6ee0b98f07 Fix Apple Reject
Add:
- prisma/migrations/20251208042529_add_accepted_terms_at/
- prisma/schema.prisma.backup
- src/app/api/mobile/user/[id]/terms-of-app/

Fix:

prisma/schema.prisma
src/app/api/auth/mobile-register/route.ts
src/app/api/mobile/forum/[id]/report-commentar/route.ts
src/app/api/mobile/forum/[id]/report-posting/route.ts

### No Issue
2025-12-08 15:29:12 +08:00
cc78d82ca4 chore(release): 1.5.24 2025-12-08 15:23:52 +08:00
3c2a8b3543 Fix QC Admin ( Inno )
- app.config.js
- app/(application)/(user)/forum/[id]/edit.tsx
- app/(application)/(user)/forum/[id]/index.tsx
- app/(application)/(user)/forum/create.tsx
- ios/HIPMIBadungConnect/Info.plist

### No Issue
2025-12-05 17:12:15 +08:00
13 changed files with 1214 additions and 3 deletions

View File

@@ -2,6 +2,8 @@
All notable changes to this project will be documented in this file. See [commit-and-tag-version](https://github.com/absolute-version/commit-and-tag-version) for commit guidelines.
## [1.5.24](https://wibugit.wibudev.com/wibu/hipmi/compare/v1.5.22...v1.5.24) (2025-12-08)
## [1.5.22](https://wibugit.wibudev.com/wibu/hipmi/compare/v1.5.21...v1.5.22) (2025-12-03)
## [1.5.21](https://wibugit.wibudev.com/wibu/hipmi/compare/v1.5.20...v1.5.21) (2025-12-03)

View File

@@ -1,6 +1,6 @@
{
"name": "hipmi",
"version": "1.5.22",
"version": "1.5.24",
"private": true,
"prisma": {
"seed": "bun prisma/seed.ts"

View File

@@ -0,0 +1,3 @@
-- AlterTable
ALTER TABLE "User" ADD COLUMN "acceptedForumTermsAt" TIMESTAMP(3),
ADD COLUMN "acceptedTermsAt" TIMESTAMP(3);

View File

@@ -55,6 +55,9 @@ model User {
blockedUsers BlockedUser[] @relation("Blocking")
blockedBy BlockedUser[] @relation("BlockedBy")
acceptedTermsAt DateTime?
acceptedForumTermsAt DateTime?
}
model MasterUserRole {

1098
prisma/schema.prisma.backup Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -41,6 +41,7 @@ export async function POST(req: Request) {
nomor: data.nomor,
active: false,
termsOfServiceAccepted: data.termsOfServiceAccepted,
acceptedTermsAt: new Date(),
},
});

View File

@@ -1,5 +1,6 @@
import _ from "lodash";
import { NextResponse } from "next/server";
import prisma from "@/lib/prisma";
export { GET };
@@ -12,7 +13,6 @@ async function GET(request: Request) {
const skipData = Number(page) * takeData - takeData;
console.log("[CATEGORY]", category);
let fixData;
try {
if (category === "dashboard") {

View File

@@ -29,6 +29,11 @@ async function GET(request: Request, { params }: { params: { id: string } }) {
},
},
},
Event: {
select: {
tanggal: true,
},
},
},
});

View File

@@ -153,6 +153,7 @@ async function GET(request: Request) {
select: {
id: true,
title: true,
tanggal: true,
Author: {
select: {
id: true,

View File

@@ -11,6 +11,24 @@ async function POST(request: Request, { params }: { params: { id: string } }) {
console.log("[ID]", id);
try {
const content = await prisma.forum_Komentar.findUnique({
where: {
id: id,
},
});
const reportList = await prisma.forumMaster_KategoriReport.findUnique({
where: {
id: data.categoryId,
},
});
const msg = `Report Komentar: "${content?.komentar}" dengan kategori \n\n\n${reportList?.title} : \n\n${reportList?.deskripsi}`;
const res = await fetch(
`https://cld-dkr-prod-wajs-server.wibudev.com/api/wa/code?nom=6282340374412&text=${msg}`,
{ cache: "no-cache" }
);
if (data.categoryId) {
fixData = await prisma.forum_ReportKomentar.create({
data: {

View File

@@ -11,6 +11,18 @@ async function POST(request: Request, { params }: { params: { id: string } }) {
console.log("[ID]", id);
try {
const content = await prisma.forum_Posting.findUnique({
where: {
id: id,
},
});
const msg = `Report Postingan: "${content?.diskusi}"`;
const res = await fetch(
`https://cld-dkr-prod-wajs-server.wibudev.com/api/wa/code?nom=6282340374412&text=${msg}`,
{ cache: "no-cache" }
);
if (data.categoryId) {
fixData = await prisma.forum_ReportPosting.create({
data: {

View File

@@ -0,0 +1,68 @@
import { NextResponse } from "next/server";
import { prisma } from "@/lib";
export { POST };
async function POST(request: Request, { params }: { params: { id: string } }) {
const { id } = params;
const { searchParams } = new URL(request.url);
const category = searchParams.get("category");
console.log("[ID USER", id);
console.log("[SEARCH PARAMS", category);
try {
const user = await prisma.user.findUnique({
where: {
id: id,
},
});
if (!user) {
return NextResponse.json(
{
success: false,
message: "User not found",
},
{ status: 404 }
);
}
const updateUser = await prisma.user.update({
where: {
id: id,
},
data: {
acceptedForumTermsAt: new Date(),
},
});
if (!updateUser) {
return NextResponse.json(
{
success: false,
message: "Gagal mengupdate data",
},
{ status: 400 }
);
}
return NextResponse.json(
{
success: true,
message: "Syarat dan Ketentuan berhasil diterima",
},
{ status: 200 }
);
} catch (error) {
return NextResponse.json(
{
success: false,
message: "Error update data from API ",
reason: (error as Error).message,
},
{ status: 500 }
);
}
}

View File

@@ -23,6 +23,6 @@
"@/*": ["./src/*"]
}
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts", "src/app_modules/investasi/proses_transaksi/view.jsx", "src/app/api/investasi/midtrans/[id]/route.ts", "src/app_modules/job/create/TextEdit.tsx"],
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts", "src/app_modules/investasi/proses_transaksi/view.jsx", "src/app/api/investasi/midtrans/[id]/route.ts", "src/app_modules/job/create/TextEdit.tsx", "src/app/api/mobile/forum/[id]/report-comment/route.ts"],
"exclude": ["node_modules"]
}