(token, path, body)
| 63 | } |
| 64 | |
| 65 | function post(token, path, body) { |
| 66 | return fetch(`${API_URL}${path}`, { |
| 67 | method: 'POST', |
| 68 | ...(body ? { body } : {}), |
| 69 | headers: { |
| 70 | ...(body ? { 'Content-Type': 'application/json' } : {}), |
| 71 | Authorization: `Bearer ${token}`, |
| 72 | }, |
| 73 | }); |
| 74 | } |
| 75 | |
| 76 | function del(token, path) { |
| 77 | return fetch(`${API_URL}${path}`, { |
no outgoing calls
no test coverage detected