Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 714cf5cd5a | |||
| a68343599d | |||
| 419b87fc92 | |||
| 0271c87ba9 | |||
| 5551f30721 |
@@ -2,6 +2,10 @@
|
||||
|
||||
All notable changes to this project will be documented in this file. See [commit-and-tag-version](https://github.com/absolute-version/commit-and-tag-version) for commit guidelines.
|
||||
|
||||
## [1.6.2](https://wibugit.wibudev.com/wibu/hipmi/compare/v1.6.1...v1.6.2) (2026-02-25)
|
||||
|
||||
## [1.6.1](https://wibugit.wibudev.com/wibu/hipmi/compare/v1.6.0...v1.6.1) (2026-02-25)
|
||||
|
||||
## [1.6.0](https://wibugit.wibudev.com/wibu/hipmi/compare/v1.5.40...v1.6.0) (2026-02-23)
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "hipmi",
|
||||
"version": "1.6.0",
|
||||
"version": "1.6.2",
|
||||
"private": true,
|
||||
"prisma": {
|
||||
"seed": "bun prisma/seed.ts"
|
||||
|
||||
@@ -14,8 +14,6 @@ export async function POST(req: Request) {
|
||||
try {
|
||||
const { data } = await req.json();
|
||||
|
||||
console.log("data >>", data);
|
||||
|
||||
const cekUsername = await prisma.user.findUnique({
|
||||
where: {
|
||||
username: data.username,
|
||||
@@ -29,12 +27,12 @@ export async function POST(req: Request) {
|
||||
});
|
||||
|
||||
// ✅ Validasi wajib setuju Terms
|
||||
if (data.termsOfServiceAccepted !== true) {
|
||||
return NextResponse.json({
|
||||
success: false,
|
||||
message: "You must agree to the Terms of Service",
|
||||
});
|
||||
}
|
||||
// if (data.termsOfServiceAccepted !== true) {
|
||||
// return NextResponse.json({
|
||||
// success: false,
|
||||
// message: "You must agree to the Terms of Service",
|
||||
// });
|
||||
// }
|
||||
|
||||
const createUser = await prisma.user.create({
|
||||
data: {
|
||||
|
||||
@@ -28,13 +28,10 @@ export default function Login({ version }: { version: string }) {
|
||||
const [countryCode, setCountryCode] = useState<string>("62"); // default ke Indonesia
|
||||
|
||||
async function onLogin() {
|
||||
console.log("phone >>", phone);
|
||||
|
||||
const nomor = phone;
|
||||
if (nomor.length <= 4) return setError(true);
|
||||
|
||||
const fixPhone = `${countryCode}${nomor}`;
|
||||
console.log("fixPhone >>", fixPhone);
|
||||
|
||||
try {
|
||||
setLoading(true);
|
||||
@@ -46,7 +43,6 @@ export default function Login({ version }: { version: string }) {
|
||||
router.push("/validasi", { scroll: false });
|
||||
} else {
|
||||
setLoading(false);
|
||||
console.log("respone >>", respone);
|
||||
ComponentGlobal_NotifikasiPeringatan(respone?.message);
|
||||
}
|
||||
} catch (error) {
|
||||
@@ -108,9 +104,6 @@ export default function Login({ version }: { version: string }) {
|
||||
// Simpan hasil akhir
|
||||
setCountryCode(dialCode);
|
||||
setPhone(localNumber);
|
||||
|
||||
// console.log("Country Code:", dialCode);
|
||||
// console.log("Clean Local Number:", localNumber);
|
||||
}}
|
||||
/>
|
||||
|
||||
|
||||
4
types/env.d.ts
vendored
4
types/env.d.ts
vendored
@@ -11,5 +11,9 @@ declare namespace NodeJS {
|
||||
NEXT_PUBLIC_BASE_SESSION_KEY?: string;
|
||||
RESEND_APIKEY?: string;
|
||||
WA_SERVER_TOKEN?: string;
|
||||
FIREBASE_ADMIN_PRIVATE_KEY?: string;
|
||||
FIREBASE_ADMIN_CLIENT_EMAIL?: string;
|
||||
FIREBASE_ADMIN_PROJECT_ID?: string;
|
||||
NEXT_PUBLIC_API_URL?: string;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user