Fix reject Apple :
Add:
src/app/api/auth/mobile-login/
src/app/api/auth/mobile-register/
src/app/api/auth/mobile-validasi/
Fix:
modified: bun.lock
modified: package.json
modified: src/app/api/mobile/voting/route.ts
### No Issue
This commit is contained in:
@@ -65,14 +65,23 @@ async function GET(request: Request) {
|
||||
const search = searchParams.get("search");
|
||||
const category = searchParams.get("category");
|
||||
const authorId = searchParams.get("authorId");
|
||||
const userLoginId = searchParams.get("userLoginId");
|
||||
|
||||
console.log("userLoginId >>", userLoginId);
|
||||
|
||||
let fixData;
|
||||
|
||||
try {
|
||||
if (category === "beranda") {
|
||||
fixData = await prisma.voting.findMany({
|
||||
if (!userLoginId) {
|
||||
return NextResponse.json(
|
||||
{ success: false, message: "User ID required" },
|
||||
{ status: 400 }
|
||||
);
|
||||
}
|
||||
const data = await prisma.voting.findMany({
|
||||
orderBy: {
|
||||
awalVote: "asc"
|
||||
awalVote: "asc",
|
||||
},
|
||||
where: {
|
||||
voting_StatusId: "1",
|
||||
@@ -85,6 +94,13 @@ async function GET(request: Request) {
|
||||
contains: search || "",
|
||||
mode: "insensitive",
|
||||
},
|
||||
NOT: {
|
||||
Voting_Kontributor: {
|
||||
some: {
|
||||
authorId: userLoginId,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
include: {
|
||||
Voting_DaftarNamaVote: {
|
||||
|
||||
Reference in New Issue
Block a user