Skip to content

Commit

Permalink
Merge pull request #11 from CodeCrew-CodeSchool/gameroom
Browse files Browse the repository at this point in the history
route modification patch
  • Loading branch information
ConnerKT authored Apr 30, 2024
2 parents e7032f1 + 5fd6702 commit e2b1292
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion webapp/src/components/AdminView/AddModal/AddModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ const handleSubmit = async () => {
const postProblemToServer = async (name, difficulty, description) => {
try {
const response = await axios.post(
"https://codecrew-leetcode-api.onrender.com/problems",
"https://codecrew-leetcode-api.onrender.com/api/problems",
{
title: name,
difficulty,
Expand Down
2 changes: 1 addition & 1 deletion webapp/src/components/AdminView/EditModal/EditModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ const handleSubmit = async () => {
const editProblemInServer = async (name, difficulty, description) => {
try {
const response = await axios.put(
`https://codecrew-leetcode-api.onrender.com/problems/${props.currentItem._id}`,
`https://codecrew-leetcode-api.onrender.com/api/problems/${props.currentItem._id}`,
{
title: name,
difficulty,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function WarningModal({ open, handleClose, itemToRemove, setItemsToAdd}) {
const handleRemoveItem = async () => {
try {
const response = await axios.delete(
`https://codecrew-leetcode-api.onrender.com/problems/${itemToRemove._id}`,
`https://codecrew-leetcode-api.onrender.com/api/problems/${itemToRemove._id}`,

);
const updatedProblems = response.data.allProblems;
Expand Down
2 changes: 1 addition & 1 deletion webapp/src/components/AdminView/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ function AdminView() {
const fetchData = async () => {
try {
const response = await axios.get(
"https://codecrew-leetcode-api.onrender.com/problems"
"https://codecrew-leetcode-api.onrender.com/api/problems"
);
setItemsToAdd(response.data);
setLoading(false);
Expand Down

0 comments on commit e2b1292

Please sign in to comment.