chore: bump @trpc/* and @tanstack/react-query (#13335)
Co-authored-by: Peer Richelsen <[email protected]> Co-authored-by: Omar López <[email protected]> Co-authored-by: CarinaWolli <[email protected]> Co-authored-by: Alex van Andel <[email protected]> Co-authored-by: zomars <[email protected]> Co-authored-by: Udit Takkar <[email protected]> Co-authored-by: Benny Joo <[email protected]> Co-authored-by: Carina Wollendorfer <[email protected]> Co-authored-by: Gergő Móricz <[email protected]> Co-authored-by: Keith Williams <[email protected]>
This commit is contained in:
183 files changed
+1203
-1013
No files matched your search
@@ -1,3 +1,4 @@
|
||||
import { keepPreviousData } from "@tanstack/react-query";
|
||||
import { signIn } from "next-auth/react";
|
||||
import { useRouter } from "next/navigation";
|
||||
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
||||
@@ -76,7 +77,7 @@ function UsersTableBare() {
|
||||
},
|
||||
{
|
||||
getNextPageParam: (lastPage) => lastPage.nextCursor,
|
||||
keepPreviousData: true,
|
||||
placeholderData: keepPreviousData,
|
||||
refetchOnWindowFocus: false,
|
||||
}
|
||||
);
|
||||
|
||||
@@ -57,9 +57,9 @@ function exclude<UserType, Key extends keyof UserType>(user: UserType, keys: Key
|
||||
/** Reusable logic that checks for admin permissions and if the requested user exists */
|
||||
//const authedAdminWithUserMiddleware = middleware();
|
||||
|
||||
const authedAdminProcedureWithRequestedUser = authedAdminProcedure.use(async ({ ctx, next, rawInput }) => {
|
||||
const authedAdminProcedureWithRequestedUser = authedAdminProcedure.use(async ({ ctx, next, getRawInput }) => {
|
||||
const { prisma } = ctx;
|
||||
const parsed = userIdSchema.safeParse(rawInput);
|
||||
const parsed = userIdSchema.safeParse(await getRawInput());
|
||||
if (!parsed.success) throw new TRPCError({ code: "BAD_REQUEST", message: "User id is required" });
|
||||
const { userId: id } = parsed.data;
|
||||
const user = await prisma.user.findUnique({ where: { id } });
|
||||
|
||||
Reference in new issue
Block a user