feat: admin app information

deskripsi:
- feature tambah stiker
This commit is contained in:
2025-05-15 15:04:30 +08:00
parent fbea35eef9
commit bc10b80139
16 changed files with 831 additions and 113 deletions

View File

@@ -3,6 +3,7 @@ export {
apiGetMasterBidangBisnis,
apiGetMasterStatusTransaksi,
apiGetAdminContact,
apiGetMasterEmotions,
};
const apiGetMasterBank = async () => {
@@ -90,3 +91,20 @@ const apiGetAdminContact = async () => {
throw error; // Re-throw the error to handle it in the calling function
}
};
const apiGetMasterEmotions = async () => {
const { token } = await fetch("/api/get-cookie").then((res) => res.json());
if (!token) return await token.json().catch(() => null);
const response = await fetch(`/api/master/emotions`, {
method: "GET",
headers: {
"Content-Type": "application/json",
Accept: "application/json",
"Access-Control-Allow-Origin": "*",
Authorization: `Bearer ${token}`,
},
});
return await response.json().catch(() => null);
};

View File

@@ -0,0 +1,17 @@
import { Prisma } from "@prisma/client";
export type ISticker = Prisma.StickerGetPayload<{
select: {
id: true;
name: true;
fileId: true;
emotions: true;
};
include: {
MasterEmotions: {
select: {
value: true;
};
};
};
}>;