Fix voting
Deksripsi: - Fix user server to API di tampilan utama voting
This commit is contained in:
@@ -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: {
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user