| 15 | .then(checkStatus); |
| 16 | |
| 17 | export const addNewStudent = student => |
| 18 | fetch("api/v1/students", { |
| 19 | headers: { |
| 20 | 'Content-Type': 'application/json' |
| 21 | }, |
| 22 | method: 'POST', |
| 23 | body: JSON.stringify(student) |
| 24 | } |
| 25 | ).then(checkStatus) |
| 26 | |
| 27 | export const deleteStudent = studentId => |
| 28 | fetch(`api/v1/students/${studentId}`, { |