fix
Deskripsi: - Upload foto profil ke storage - Upload background profile ke storge ## No Issue
This commit is contained in:
@@ -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,
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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,
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user