mirror of
https://github.com/i701/sarlink-portal.git
synced 2025-07-01 21:28:23 +00:00
Refactor user actions and authentication components
- Updated user verification logic to include atoll and island relationships. - Introduced CreateClient function for integrating with external client API. - Replaced 'house_name' with 'address' in user signup data handling. - Added new Checkbox component for improved UI interactions. - Migrated database provider from SQLite to PostgreSQL and redefined user schema. - Removed obsolete migration files and ensured database integrity with new structure.
This commit is contained in:
@ -3,10 +3,10 @@
|
||||
import { authClient } from "@/lib/auth-client";
|
||||
import prisma from "@/lib/db";
|
||||
import { signUpFormSchema } from "@/lib/schemas";
|
||||
import { headers } from "next/headers";
|
||||
// import type { User } from "@prisma/client";
|
||||
import { redirect } from "next/navigation";
|
||||
import { z } from "zod";
|
||||
import { headers } from "next/headers";
|
||||
const formSchema = z.object({
|
||||
phoneNumber: z
|
||||
.string()
|
||||
@ -112,7 +112,7 @@ export async function signup(_actionState: ActionState, formData: FormData) {
|
||||
name: parsedData.data.name,
|
||||
islandId: parsedData.data.island_id,
|
||||
atollId: parsedData.data.atoll_id,
|
||||
house_name: parsedData.data.house_name,
|
||||
address: parsedData.data.address,
|
||||
id_card: parsedData.data.id_card,
|
||||
dob: new Date(parsedData.data.dob),
|
||||
role: "USER",
|
||||
|
Reference in New Issue
Block a user