Form is able to post request
This commit is contained in:
parent
4298fa3397
commit
9d92b48aab
|
@ -36,10 +36,13 @@ const InitialValues: CalendarEventRequest = {
|
|||
|
||||
export default class CreateEvent extends React.Component {
|
||||
|
||||
componentDidMount(){
|
||||
axios.get('/api/events').then(events => console.log('boludo', events))
|
||||
}
|
||||
submitEvent(event: CalendarEventRequest) {
|
||||
axios.post('/api/event', event, {
|
||||
axios.post('/api/events', event, {
|
||||
headers: {
|
||||
Accept: 'application/json'
|
||||
Accept: '*/*'
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
},
|
||||
"rules": {
|
||||
"member-access": false,
|
||||
"object-literal-sort-keys":false
|
||||
"object-literal-sort-keys":false,
|
||||
"no-console": false
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue