refresh token arreglado
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
// auth/actions/refresh-token-action.ts
|
||||
'use server';
|
||||
import { refreshApi } from '@/lib/refreshApi'; // Importa la nueva instancia
|
||||
import {
|
||||
@@ -7,7 +8,7 @@ import {
|
||||
|
||||
export const resfreshTokenAction = async (refreshToken: RefreshTokenValue) => {
|
||||
try {
|
||||
const response = await refreshApi.patch('/auth/refresh', {refresh_token: refreshToken.token});
|
||||
const response = await refreshApi.patch('/auth/refresh', refreshToken);
|
||||
|
||||
const parsed = RefreshTokenResponseSchema.safeParse(response.data);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user