falta testeo

This commit is contained in:
fede committed 2026-11-17 15:09:38 -03:00
1 parent 9205fea8d8
commit 61ca620c8e
50 files changed
+3061 -1112

No files matched your search

+17
View File
@@ -0,0 +1,17 @@
import { API_URL } from '$lib/env';
import { getToken } from '../token';
export async function ajustarStock(body: any) {
try {
const req = await fetch(`${API_URL}/stock/ajustes`, {
method: 'POST',
headers: { 'Content-Type': 'application/json', Authorization: `Bearer ${getToken()}` },
body: JSON.stringify(body)
});
const data = await req.json();
if (req.ok) return data;
return data.error ?? 'error';
} catch {
return 'no se pudo alcanzar el servidor';
}
}