Guardar y cambiar img al editar productos
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user