upd: login tanpa otp
Deskripsi: - struktur db - update api - update api version app No Issues
This commit is contained in:
@@ -7,7 +7,7 @@ export async function POST(req: NextRequest) {
|
||||
const { phone }: ILogin = await req.json();
|
||||
const user = await prisma.user.findUnique({
|
||||
where: { phone, isActive: true },
|
||||
select: { id: true, phone: true },
|
||||
select: { id: true, phone: true, isWithoutOTP: true },
|
||||
});
|
||||
|
||||
if (!user) {
|
||||
@@ -21,6 +21,7 @@ export async function POST(req: NextRequest) {
|
||||
success: true,
|
||||
message: "Sukses",
|
||||
phone: user.phone,
|
||||
isWithoutOTP: user.isWithoutOTP,
|
||||
id: user.id,
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user