add random to display
All checks were successful
backend-action / build-image (push) Successful in 26s
All checks were successful
backend-action / build-image (push) Successful in 26s
This commit is contained in:
@@ -10,7 +10,7 @@ import {
|
||||
} from "./schema";
|
||||
import { createInsertSchema } from "drizzle-zod";
|
||||
import { z } from "zod";
|
||||
import { SQL, and, count, eq, inArray } from "drizzle-orm";
|
||||
import { SQL, and, count, eq, inArray, sql } from "drizzle-orm";
|
||||
import { Config } from "./config";
|
||||
import { TRPCError } from "@trpc/server";
|
||||
import * as jwt from "jsonwebtoken";
|
||||
@@ -170,6 +170,7 @@ async function getAllUser(
|
||||
},
|
||||
limit,
|
||||
offset,
|
||||
orderBy: sql`random()`,
|
||||
where: (user, { eq, and }) => {
|
||||
let conditions: SQL[] = [];
|
||||
if (group !== undefined) {
|
||||
|
||||
Reference in New Issue
Block a user