mirror of
https://github.com/10h30/fullstackopen.git
synced 2026-07-13 19:55:55 +09:00
Completed 2.16 (fix error)
This commit is contained in:
@@ -8,18 +8,20 @@ const getContact = () => {
|
||||
return contact.then(response => response.data)
|
||||
}
|
||||
|
||||
/*
|
||||
const updateContact = newObject => {
|
||||
return axios.post(baseUrl, newObject)
|
||||
|
||||
const updateContact = newPerson => {
|
||||
const contact = axios.post(baseUrl, newPerson)
|
||||
return contact.then(response => response.data)
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
const update = (id, newObject) => {
|
||||
return axios.put(`${baseUrl}/${id}`, newObject)
|
||||
}*/
|
||||
|
||||
const Contact = {
|
||||
getContact
|
||||
getContact, updateContact
|
||||
}
|
||||
|
||||
export default Contact
|
||||
Reference in New Issue
Block a user