Fix voting

Deksripsi:
- Fix user server to API di tampilan utama voting
This commit is contained in:
2024-12-27 11:04:55 +08:00
parent 5f8a1c38d0
commit 924e994236
34 changed files with 1039 additions and 468 deletions

View File

@@ -1,5 +1,5 @@
import { prisma } from "@/app/lib";
import { newFunGetUserId } from "@/app/lib/new_fun_user_id";
import { funGetUserIdByToken } from "@/app_modules/_global/fun/get";
import backendLogger from "@/util/backendLogger";
import { NextResponse } from "next/server";
@@ -7,7 +7,7 @@ export const dynamic = "force-dynamic";
export async function GET(request: Request) {
try {
const userLoginId = await newFunGetUserId();
const userLoginId = await funGetUserIdByToken();
const count = await prisma.notifikasi.findMany({
where: {

View File

@@ -1,5 +1,5 @@
import { prisma } from "@/app/lib";
import { newFunGetUserId } from "@/app/lib/new_fun_user_id";
import { funGetUserIdByToken } from "@/app_modules/_global/fun/get";
import { ICategoryapp } from "@/app_modules/notifikasi/model/interface";
import backendLogger from "@/util/backendLogger";
import _ from "lodash";
@@ -13,7 +13,7 @@ export async function GET(request: Request) {
const category = searchParams.get("category") as ICategoryapp;
const page = searchParams.get("page");
const userLoginId = await newFunGetUserId();
const userLoginId = await funGetUserIdByToken();
const fixPage = _.toNumber(page);
const takeData = 10;
const skipData = fixPage * takeData - takeData;