File tree Expand file tree Collapse file tree 3 files changed +5
-8
lines changed
Expand file tree Collapse file tree 3 files changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ function SessionParticipantsModal() {
2525 sessionToken,
2626 setSessionUsers,
2727 updateSessionUser,
28+ updateReplyIsHost,
2829 } = useSessionStore ( ) ;
2930
3031 const [ selectedUserId , setSelectedUserId ] = useState < number > ( ) ;
@@ -48,6 +49,7 @@ function SessionParticipantsModal() {
4849 isHost : params . isHost ,
4950 } ) ,
5051 onSuccess : ( res ) => {
52+ updateReplyIsHost ( res . user . userId , res . user . isHost ) ;
5153 updateSessionUser ( res . user ) ;
5254 addToast ( {
5355 type : 'SUCCESS' ,
Original file line number Diff line number Diff line change @@ -2,9 +2,7 @@ import axios from 'axios';
22
33import {
44 PostLoginRequestDTO ,
5- PostLoginRequestSchema ,
65 PostLoginResponseDTO ,
7- PostLoginResponseSchema ,
86 PostRefreshResponseDTO ,
97 PostRefreshResponseSchema ,
108} from '@/features/auth/auth.dto' ;
@@ -13,11 +11,8 @@ const AUTH_BASE_URL = '/api/auth';
1311
1412export const login = ( body : PostLoginRequestDTO ) =>
1513 axios
16- . post < PostLoginResponseDTO > (
17- `${ AUTH_BASE_URL } /login` ,
18- PostLoginRequestSchema . parse ( body ) ,
19- )
20- . then ( ( res ) => PostLoginResponseSchema . parse ( res . data ) ) ;
14+ . post < PostLoginResponseDTO > ( `${ AUTH_BASE_URL } /login` , body )
15+ . then ( ( res ) => res . data ) ;
2116
2217export const logout = ( ) => axios . post ( `${ AUTH_BASE_URL } /logout` ) ;
2318
Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ export function useSignInForm() {
5858 const isLoginEnabled = email . length > 0 && password . length > 7 && ! isPending ;
5959
6060 const handleLogin = ( callback : ( ) => void ) =>
61- loginQuery ( { email, password } , { onSettled : callback } ) ;
61+ loginQuery ( { email, password } , { onSuccess : callback } ) ;
6262
6363 return {
6464 email,
You can’t perform that action at this time.
0 commit comments