mirror of
https://github.com/better-auth/better-auth.git
synced 2026-05-27 17:36:42 -05:00
chore: lint
This commit is contained in:
@@ -225,12 +225,16 @@ export const admin = (options?: AdminOptions) => {
|
||||
offset: z.string().or(z.number()).optional(),
|
||||
sortBy: z.string().optional(),
|
||||
sortDirection: z.enum(["asc", "desc"]).optional(),
|
||||
filter: z.array(z.object({
|
||||
field: z.string(),
|
||||
value: z.string().or(z.number()).or(z.boolean()),
|
||||
operator: z.enum(["eq", "ne", "lt", "lte", "gt", "gte"]),
|
||||
connector: z.enum(["AND", "OR"]).optional()
|
||||
})).optional()
|
||||
filter: z
|
||||
.array(
|
||||
z.object({
|
||||
field: z.string(),
|
||||
value: z.string().or(z.number()).or(z.boolean()),
|
||||
operator: z.enum(["eq", "ne", "lt", "lte", "gt", "gte"]),
|
||||
connector: z.enum(["AND", "OR"]).optional(),
|
||||
}),
|
||||
)
|
||||
.optional(),
|
||||
}),
|
||||
},
|
||||
async (ctx) => {
|
||||
@@ -243,8 +247,7 @@ export const admin = (options?: AdminOptions) => {
|
||||
direction: ctx.query.sortDirection || "asc",
|
||||
}
|
||||
: undefined,
|
||||
ctx.query?.filter
|
||||
|
||||
ctx.query?.filter,
|
||||
);
|
||||
return ctx.json({
|
||||
users: users as UserWithRole[],
|
||||
|
||||
Reference in New Issue
Block a user