mirror of
https://github.com/i701/sarlink-portal.git
synced 2025-10-05 16:05:23 +00:00
chore: add skeletons to tables and loading.tsx files for routes and run formatting ♻️
All checks were successful
Build and Push Docker Images / Build and Push Docker Images (push) Successful in 12m20s
All checks were successful
Build and Push Docker Images / Build and Push Docker Images (push) Successful in 12m20s
This commit is contained in:
@@ -11,14 +11,14 @@ import { handleApiResponse } from "@/utils/tryCatch";
|
||||
|
||||
type VerifyUserResponse =
|
||||
| {
|
||||
ok: boolean;
|
||||
mismatch_fields: string[] | null;
|
||||
error: string | null;
|
||||
detail: string | null;
|
||||
}
|
||||
ok: boolean;
|
||||
mismatch_fields: string[] | null;
|
||||
error: string | null;
|
||||
detail: string | null;
|
||||
}
|
||||
| {
|
||||
message: boolean;
|
||||
};
|
||||
message: boolean;
|
||||
};
|
||||
export async function verifyUser(userId: string) {
|
||||
const session = await getServerSession(authOptions);
|
||||
if (!session?.apiToken) {
|
||||
@@ -129,7 +129,6 @@ export type UpdateUserFormState = {
|
||||
payload?: FormData;
|
||||
};
|
||||
|
||||
|
||||
export async function updateUser(
|
||||
_prevState: UpdateUserFormState,
|
||||
formData: FormData,
|
||||
@@ -190,7 +189,6 @@ export async function updateUser(
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
export async function updateUserAgreement(
|
||||
_prevState: UpdateUserFormState,
|
||||
formData: FormData,
|
||||
@@ -258,14 +256,13 @@ export async function adminUserTopup(
|
||||
const description = formData.get("description") as string;
|
||||
const session = await getServerSession(authOptions);
|
||||
|
||||
|
||||
if (!amount) {
|
||||
return {
|
||||
status: false,
|
||||
message: "Amount is required",
|
||||
fieldErrors: { amount: ["Amount is required"], description: [] },
|
||||
payload: formData,
|
||||
}
|
||||
};
|
||||
}
|
||||
const response = await fetch(
|
||||
`${process.env.SARLINK_API_BASE_URL}/api/billing/admin-topup/`,
|
||||
|
Reference in New Issue
Block a user