fix
Deskripsi: - Upload ke stroage untuk job ## Np Issuee
This commit is contained in:
@@ -1,14 +1,14 @@
|
||||
"use server";
|
||||
|
||||
import prisma from "@/app/lib/prisma";
|
||||
import { user_funGetOneUserId } from "@/app_modules/fun_global/get_user_token";
|
||||
import { funGetUserIdByToken } from "@/app_modules/_global/fun/get";
|
||||
|
||||
export default async function adminNotifikasi_countNotifikasi() {
|
||||
const adminId = await user_funGetOneUserId();
|
||||
const userLoginId = await funGetUserIdByToken();
|
||||
|
||||
const data = await prisma.notifikasi.findMany({
|
||||
where: {
|
||||
adminId: adminId,
|
||||
adminId: userLoginId,
|
||||
isRead: false,
|
||||
userRoleId: "2",
|
||||
},
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
"use server";
|
||||
|
||||
import prisma from "@/app/lib/prisma";
|
||||
import { user_funGetOneUserId } from "@/app_modules/fun_global/get_user_token";
|
||||
import { funGetUserIdByToken } from "@/app_modules/_global/fun/get";
|
||||
import { MODEL_NOTIFIKASI } from "@/app_modules/notifikasi/model/interface";
|
||||
|
||||
export default async function adminNotifikasi_funCreateToUser({
|
||||
@@ -9,11 +9,11 @@ export default async function adminNotifikasi_funCreateToUser({
|
||||
}: {
|
||||
data: MODEL_NOTIFIKASI;
|
||||
}) {
|
||||
const adminId = await user_funGetOneUserId();
|
||||
const userLoginId = await funGetUserIdByToken();
|
||||
|
||||
const create = await prisma.notifikasi.create({
|
||||
data: {
|
||||
adminId: adminId,
|
||||
adminId: userLoginId,
|
||||
userId: data.userId,
|
||||
appId: data.appId,
|
||||
status: data.status,
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
"use server";
|
||||
|
||||
import prisma from "@/app/lib/prisma";
|
||||
import { user_funGetOneUserId } from "@/app_modules/fun_global/get_user_token";
|
||||
import { NextRequest } from "next/server";
|
||||
import { funGetUserIdByToken } from "@/app_modules/_global/fun/get";
|
||||
|
||||
export default async function adminNotifikasi_getByUserId() {
|
||||
const adminId = await user_funGetOneUserId();
|
||||
const userLoginId = await funGetUserIdByToken();
|
||||
|
||||
const data = await prisma.notifikasi.findMany({
|
||||
orderBy: [
|
||||
@@ -17,7 +16,7 @@ export default async function adminNotifikasi_getByUserId() {
|
||||
},
|
||||
],
|
||||
where: {
|
||||
adminId: adminId,
|
||||
adminId: userLoginId,
|
||||
userRoleId: "2",
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user