Deskripsi:
- Upload foto profil ke storage
- Upload background profile ke storge
## No Issue
This commit is contained in:
2024-09-25 14:04:18 +08:00
parent 5670feb08c
commit 827b7c7bc1
54 changed files with 812 additions and 936 deletions

View File

@@ -2,11 +2,15 @@
import prisma from "@/app/lib/prisma";
export async function auth_funDeleteAktivasiKodeOtpById(otpId: string) {
export async function auth_funDeleteAktivasiKodeOtpById({
nomor,
}: {
nomor: string;
}) {
// console.log(otpId);
const updt = await prisma.kodeOtp.delete({
const updt = await prisma.kodeOtp.deleteMany({
where: {
id: otpId,
nomor: nomor,
},
});

View File

@@ -13,6 +13,9 @@ export async function Auth_funRegister({
data: any;
HIPMI_PWD: string;
}) {
const pswd = process.env.WIBU_PWD as string;
const cekUsername = await prisma.user.findUnique({
where: {
username: data.username,
@@ -39,14 +42,14 @@ export async function Auth_funRegister({
username: create.username,
}),
{
password: HIPMI_PWD,
password: pswd,
}
);
cookies().set({
name: "ssn",
value: sealToken,
// maxAge: 60 * 60 * 24 * 7,
maxAge: 60 * 60 * 24 * 7,
});
try {

View File

@@ -13,6 +13,9 @@ export async function auth_funValidasi({
nomor: string;
HIPMI_PWD: string;
}) {
const pswd = process.env.WIBU_PWD as string;
const cekUser = await prisma.user.findUnique({
where: {
nomor: nomor,
@@ -34,7 +37,7 @@ export async function auth_funValidasi({
username: cekUser.username,
}),
{
password: HIPMI_PWD,
password: pswd,
}
);