-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Labels
assignedAlready assigned to someone, don't work on the same issueAlready assigned to someone, don't work on the same issueenhancementNew feature or requestNew feature or requestfeatureA new feature, or modifications to an existing oneA new feature, or modifications to an existing onegood first issueGood for newcomersGood for newcomershackHacktoberfestHacktoberfesthelp wantedExtra attention is neededExtra attention is neededpriorityWould love to close this issue ASAPWould love to close this issue ASAP
Description
React calls are being made in place using direct http links. This can be moved to a separate module and then call paths where needed.
axios
.get('http://localhost:5000/api/courses', { withCredentials: true })
.then((res) => {
setAllCourses(res.data);
setCourses(res.data);
})
.catch((err) => {
console.log('Error:', err);
});import {axiosHandler} from 'contexts/axios'
axiosHandler
.get('api/courses', { withCredentials: true })
.then((res) => {
setAllCourses(res.data);
setCourses(res.data);
})
.catch((err) => {
console.log('Error:', err);
});Response data also needs to be formatted to use new Django responses.
Metadata
Metadata
Assignees
Labels
assignedAlready assigned to someone, don't work on the same issueAlready assigned to someone, don't work on the same issueenhancementNew feature or requestNew feature or requestfeatureA new feature, or modifications to an existing oneA new feature, or modifications to an existing onegood first issueGood for newcomersGood for newcomershackHacktoberfestHacktoberfesthelp wantedExtra attention is neededExtra attention is neededpriorityWould love to close this issue ASAPWould love to close this issue ASAP