-
Notifications
You must be signed in to change notification settings - Fork 219
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Inconsistency fix and backend integration, worked on events client si…
…de (#470) * fixed some client side issues and integrated backend * Make build.sh executable Co-authored-by: Devesh Verma <[email protected]>
- Loading branch information
1 parent
ac764e7
commit 4a1d1a0
Showing
34 changed files
with
513 additions
and
103 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
before_install: | ||
- chmod +x build.sh |
Empty file.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import axios from 'axios'; | ||
import { errorHandler } from '../utils/errorHandler'; | ||
import { setRequestStatus } from '../utils/setRequestStatus'; | ||
|
||
// DELETE EVENT REQUEST | ||
export const deleteEvent = (eventId) => async (dispatch) => { | ||
try { | ||
const res = await axios.delete(`/event/${eventId}`) | ||
dispatch(setRequestStatus(false)); | ||
if(res.status === 200){ | ||
dispatch(setRequestStatus(true)); | ||
} | ||
} catch(error) { | ||
dispatch(errorHandler(error)) | ||
} | ||
} | ||
|
||
// UPDATE EVENT REQUEST | ||
export const updateEvent = (eventId, updatedInfo) => async (dispatch) => { | ||
try { | ||
const res = await axios.patch(`/event/${eventId}`, updatedInfo); | ||
dispatch(setRequestStatus(false)); | ||
if(res.status === 200){ | ||
dispatch(setRequestStatus(true)); | ||
} | ||
} catch(error) { | ||
dispatch(errorHandler(error)) | ||
} | ||
} | ||
|
||
// CREATE EVENT | ||
export const createEvent = (eventInfo, history) => async (dispatch) => { | ||
try { | ||
const res = await axios.post('/event/', eventInfo) | ||
dispatch(setRequestStatus(false)) | ||
if(res.status === 201){ | ||
dispatch(setRequestStatus(true)) | ||
history.push('/events'); | ||
} | ||
} catch(error) { | ||
dispatch(errorHandler(error)) | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.