aboutsummaryrefslogtreecommitdiff
path: root/part2/phonebook/src/services/persons.js
diff options
context:
space:
mode:
Diffstat (limited to 'part2/phonebook/src/services/persons.js')
-rw-r--r--part2/phonebook/src/services/persons.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/part2/phonebook/src/services/persons.js b/part2/phonebook/src/services/persons.js
index d65f4a3..1da7de4 100644
--- a/part2/phonebook/src/services/persons.js
+++ b/part2/phonebook/src/services/persons.js
@@ -13,4 +13,8 @@ const update = (id, changedPerson) => {
return axios.put(`${baseUrl}/${id}`, changedPerson)
}
-export default { getAll, create, update }
+const remove = (id) => {
+ return axios.delete(`${baseUrl}/${id}`)
+}
+
+export default { getAll, create, update, remove }