filtro em produtos, bug tela de preparo, nome do user nas comandas e itens

This commit is contained in:
2026-07-23 12:50:26 -03:00
parent 14a36b68b5
commit 14e92c91fd
8 changed files with 407 additions and 31 deletions

16
test-api.ts Normal file
View File

@@ -0,0 +1,16 @@
(async () => {
const res = await fetch('http://localhost:3333/api/auth/login', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ email: 'admin@gastrobar.com', senha: '123456' }),
});
const data = await res.json();
console.log('TOKEN:', data.token);
const res2 = await fetch('http://localhost:3333/api/comandas?status=ABERTA,FECHADA', {
headers: { Authorization: `Bearer ${data.token}` },
});
const data2 = await res2.json();
console.log('COMANDAS STATUS:', res2.status);
console.log('COMANDAS:', JSON.stringify(data2, null, 2));
})();