File tree Expand file tree Collapse file tree 3 files changed +6
-5
lines changed
Expand file tree Collapse file tree 3 files changed +6
-5
lines changed Original file line number Diff line number Diff line change 1414 "dependencies" : {
1515 "@elysiajs/eden" : " 1.4.5" ,
1616 "@prisma/client" : " 7.0.1" ,
17- "@tanstack/react-query" : " 5.87.4 " ,
17+ "@tanstack/react-query" : " 5.90.11 " ,
1818 "elysia" : " 1.4.17" ,
1919 "jose" : " 6.1.3" ,
2020 "next" : " 16.0.6" ,
Original file line number Diff line number Diff line change @@ -5,15 +5,15 @@ import { useMutation } from "@tanstack/react-query";
55export function useRegisterMutation ( ) {
66 return useMutation ( {
77 mutationFn : async (
8- ... args : Parameters < typeof rpc . api . auth . register . post >
9- ) => handleEden ( await rpc . api . auth . register . post ( ... args ) ) ,
8+ args : Parameters < typeof rpc . api . auth . register . post > [ 0 ]
9+ ) => handleEden ( await rpc . api . auth . register . post ( args ) ) ,
1010 } ) ;
1111}
1212
1313export function useLoginMutation ( ) {
1414 return useMutation ( {
15- mutationFn : async ( ... args : Parameters < typeof rpc . api . auth . login . post > ) =>
16- handleEden ( await rpc . api . auth . login . post ( ... args ) ) ,
15+ mutationFn : async ( args : Parameters < typeof rpc . api . auth . login . post > [ 0 ] ) =>
16+ handleEden ( await rpc . api . auth . login . post ( args ) ) ,
1717 } ) ;
1818}
1919
Original file line number Diff line number Diff line change @@ -39,6 +39,7 @@ export function handleEden<T, E = unknown>(
3939 if ( response . error ) throw response . error ;
4040 return response . data ;
4141}
42+
4243/**
4344 * Safe parsing utility for TypeBox schemas that returns a discriminated union result
4445 * rather than throwing errors. Similar to Zod's safeParse pattern.
You can’t perform that action at this time.
0 commit comments