Guardar y cambiar img al editar productos

This commit is contained in:
2025-08-12 15:58:32 -04:00
parent 8a54bf7138
commit 854b31f594
20 changed files with 162 additions and 50 deletions

View File

@@ -69,7 +69,7 @@ const authConfig: NextAuthConfig = {
response.type === 'UNKNOWN_ERROR') // Incluye todos los tipos de error posibles
) {
// Si es un error, lánzalo. Este camino termina aquí.
throw new CredentialsSignin(response.message);
throw new CredentialsSignin( "Error en la API:" + response.message);
}
if (!('user' in response)) {
@@ -136,7 +136,7 @@ const authConfig: NextAuthConfig = {
token.refresh_token = res.tokens.refresh_token;
token.refresh_expire_in = res.tokens.refresh_expire_in;
} catch (error) {
console.log(error);
console.log("error: ",error);
return null;
}
}

View File

@@ -54,7 +54,7 @@ export const safeFetchApi = async <T extends z.ZodSchema<any>>(
[{ type: string; message: string; details?: any } | null, z.infer<T> | null]
> => {
try {
// console.log(url,method,data);
console.log(url,method,data);
const response = await fetchApi({
method,