feat(user): add admin topup functionality in user details page

This commit is contained in:
2025-07-27 12:37:38 +05:00
parent 3943c0d6c8
commit 644e4f730f
11 changed files with 447 additions and 287 deletions
+2 -2
View File
@@ -8,10 +8,10 @@ import { handleApiResponse } from "@/utils/tryCatch";
type ParamProps = {
[key: string]: string | number | undefined;
};
export async function getUsers(params: ParamProps) {
export async function getUsers(params?: ParamProps) {
const session = await getServerSession(authOptions);
const query = Object.entries(params)
const query = Object.entries(params ?? {})
.filter(([_, value]) => value !== undefined && value !== "")
.map(
([key, value]) =>