const BASE = 'http://localhost:5246' const login = await fetch(BASE + '/api/auth/login', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ username: 'admin', password: '123456' }) }).then((r) => r.json()) const h = { Authorization: `Bearer ${login.token}` } for (const id of [60, 61]) { const res = await fetch(`${BASE}/api/farmers/${id}`, { method: 'DELETE', headers: h }) console.log(`delete ${id} => ${res.status}`) }