title: auto
des: auto note:auto
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
import { MyConsole } from "@/app/fun/my_console";
|
||||
import { myConsole } from "@/app/fun/my_console";
|
||||
import prisma from "@/app/lib/prisma";
|
||||
import { NextResponse } from "next/server";
|
||||
|
||||
export async function POST(req: Request) {
|
||||
if (req.method === "POST") {
|
||||
const body = await req.json();
|
||||
MyConsole(body);
|
||||
myConsole(body);
|
||||
|
||||
try {
|
||||
await fetch(
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { sealData } from "iron-session";
|
||||
import { MyConsole } from "@/app/fun/my_console";
|
||||
import { myConsole } from "@/app/fun/my_console";
|
||||
import prisma from "@/app/lib/prisma";
|
||||
import { data } from "autoprefixer";
|
||||
import { NextResponse } from "next/server";
|
||||
@@ -18,7 +18,7 @@ export async function POST(req: Request) {
|
||||
},
|
||||
});
|
||||
|
||||
MyConsole(cekUsername);
|
||||
myConsole(cekUsername);
|
||||
|
||||
if (cekUsername)
|
||||
return NextResponse.json({ status: 400, message: "Username sudah ada" });
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { MyConsole } from "@/app/fun/my_console";
|
||||
import { myConsole } from "@/app/fun/my_console";
|
||||
import prisma from "@/app/lib/prisma";
|
||||
import { NextResponse } from "next/server";
|
||||
import { cookies } from "next/headers";
|
||||
@@ -8,7 +8,7 @@ import {getConfig} from "@/bin/config";
|
||||
export async function POST(req: Request) {
|
||||
if (req.method === "POST") {
|
||||
const body = await req.json();
|
||||
MyConsole(body);
|
||||
myConsole(body);
|
||||
|
||||
const data = await prisma.user.findUnique({
|
||||
where: {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { useState } from "react";
|
||||
|
||||
export function MyConsole(value: any) {
|
||||
export function myConsole(value: any) {
|
||||
const onData = false;
|
||||
if (onData) {
|
||||
console.log(value);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
"use client";
|
||||
|
||||
import { MyConsole } from "@/app/fun/my_console";
|
||||
import { myConsole } from "@/app/fun/my_console";
|
||||
import { randomOTP } from "@/app/fun/rondom_otp";
|
||||
import { ApiHipmi } from "@/app/lib/api";
|
||||
import { Warna } from "@/app/lib/warna";
|
||||
@@ -37,7 +37,7 @@ export default function Login() {
|
||||
})
|
||||
.then((res) => res.json())
|
||||
.then((val) => {
|
||||
MyConsole(val);
|
||||
myConsole(val);
|
||||
if (val.status == 200) {
|
||||
toast(val.message);
|
||||
setCode(val.body.otp);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
"use client";
|
||||
import { MyConsole } from "@/app/fun/my_console";
|
||||
import { myConsole } from "@/app/fun/my_console";
|
||||
import { ApiHipmi } from "@/app/lib/api";
|
||||
import { Button } from "@mantine/core";
|
||||
import { useRouter } from "next/navigation";
|
||||
|
||||
@@ -6,7 +6,7 @@ import { IconCircleLetterH } from "@tabler/icons-react";
|
||||
import { gs_nomor } from "../state/state";
|
||||
import { useAtom } from "jotai";
|
||||
import { useState } from "react";
|
||||
import { MyConsole } from "@/app/fun/my_console";
|
||||
import { myConsole } from "@/app/fun/my_console";
|
||||
import toast from "react-simple-toasts";
|
||||
import { ApiHipmi } from "@/app/lib/api";
|
||||
import { useRouter } from "next/navigation";
|
||||
@@ -17,7 +17,7 @@ export default function Register() {
|
||||
const [value, setValue] = useState("");
|
||||
|
||||
const onRegister = async () => {
|
||||
MyConsole(value);
|
||||
myConsole(value);
|
||||
|
||||
const body = {
|
||||
username: value,
|
||||
@@ -36,7 +36,7 @@ export default function Register() {
|
||||
})
|
||||
.then((res) => res.json())
|
||||
.then((val) => {
|
||||
MyConsole(val);
|
||||
myConsole(val);
|
||||
if (val.status == 201) {
|
||||
toast("Pendaftaran Berhasil");
|
||||
return route.push("/dev/home");
|
||||
|
||||
@@ -13,7 +13,7 @@ import {
|
||||
import { gs_nomor, gs_otp } from "../state/state";
|
||||
import { Warna } from "@/app/lib/warna";
|
||||
import { useState } from "react";
|
||||
import { MyConsole } from "@/app/fun/my_console";
|
||||
import { myConsole } from "@/app/fun/my_console";
|
||||
import { IconCircleLetterH } from "@tabler/icons-react";
|
||||
import toast from "react-simple-toasts";
|
||||
import { ApiHipmi } from "@/app/lib/api";
|
||||
@@ -45,7 +45,7 @@ export default function Validasi() {
|
||||
})
|
||||
.then((res) => res.json())
|
||||
.then((val) => {
|
||||
MyConsole(val);
|
||||
myConsole(val);
|
||||
if (val.status == 200) {
|
||||
toast("Berhasil Login");
|
||||
return router.push("/dev/home");
|
||||
|
||||
Reference in New Issue
Block a user