Skip to content
Snippets Groups Projects
Commit 7fe4859b authored by Chif Gergő's avatar Chif Gergő
Browse files

Change endpoint call

parent e788d77c
No related branches found
No related tags found
No related merge requests found
...@@ -112,7 +112,7 @@ export const eventDate = (name, value) => ( ...@@ -112,7 +112,7 @@ export const eventDate = (name, value) => (
export const addEvent = ({ name, date }) => ( export const addEvent = ({ name, date }) => (
async (dispatch) => { async (dispatch) => {
try { try {
const response = await axios.post('/api/v1/events/', { const response = await axios.post('/api/v1/staff_events/', {
name, name,
date, date,
}); });
...@@ -134,7 +134,7 @@ export const addEvent = ({ name, date }) => ( ...@@ -134,7 +134,7 @@ export const addEvent = ({ name, date }) => (
export const deleteEvent = event => ( export const deleteEvent = event => (
async (dispatch) => { async (dispatch) => {
try { try {
const response = await axios.delete(`/api/v1/events/${event.id}/`); const response = await axios.delete(`/api/v1/staff_events/${event.id}/`);
if (!response.data.id) { if (!response.data.id) {
alert('Sikeres törlés!'); alert('Sikeres törlés!');
dispatch({ dispatch({
......
...@@ -36,7 +36,7 @@ class Schedule extends Component { ...@@ -36,7 +36,7 @@ class Schedule extends Component {
<Icon name='quidditch' color='blue' />{event.name} <Icon name='quidditch' color='blue' />{event.name}
</Grid.Column> </Grid.Column>
<Grid.Column floated='right' width={8} textAlign='right'> <Grid.Column floated='right' width={8} textAlign='right'>
{moment(event.date).format('LLL')} {moment(event.date).locale('hu').format('LLLL')}
</Grid.Column> </Grid.Column>
</Grid> </Grid>
</h2> </h2>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment