tokenRefresh, crear y editar productos con img funcionando
This commit is contained in:
@@ -7,14 +7,9 @@ import {
|
||||
|
||||
export const resfreshTokenAction = async (refreshToken: RefreshTokenValue) => {
|
||||
try {
|
||||
const body = {
|
||||
token: refreshToken.token,
|
||||
}
|
||||
const response = await refreshApi.patch('/auth/refresh', {refresh_token: refreshToken.token});
|
||||
|
||||
// Usa la nueva instancia `refreshApi`
|
||||
const response = await refreshApi.patch('/auth/refresh', body);
|
||||
|
||||
const parsed = RefreshTokenResponseSchema.safeParse(response.data);
|
||||
const parsed = RefreshTokenResponseSchema.safeParse(response.data);
|
||||
|
||||
if (!parsed.success) {
|
||||
console.error('Error de validación en la respuesta de refresh token:', {
|
||||
|
||||
Reference in New Issue
Block a user