Skip to content

Commit

Permalink
fixed buggy urls
Browse files Browse the repository at this point in the history
  • Loading branch information
alexlux58 committed Jan 13, 2024
1 parent e948d85 commit 6204304
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 8 deletions.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion backend/API/wwwroot/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Activities Social Network</title>
<script type="module" crossorigin src="/assets/index-85f7d8cf.js"></script>
<script type="module" crossorigin src="/assets/index-3e39eb06.js"></script>
<link rel="stylesheet" href="/assets/index-9e84d14c.css">
</head>
<body>
Expand Down
20 changes: 14 additions & 6 deletions frontend/client-app/src/components/errors/TestError.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,35 @@ export default function TestErrors() {
// const baseUrl = import.meta.env.VITE_API_URL;

function handleNotFound() {
axios.get("/buggy/not-found").catch((err) => console.log(err.response));
axios.get("api/buggy/not-found").catch((err) => console.log(err.response));
}

function handleBadRequest() {
axios.get("/buggy/bad-request").catch((err) => console.log(err.response));
axios
.get("api/buggy/bad-request")
.catch((err) => console.log(err.response));
}

function handleServerError() {
axios.get("/buggy/server-error").catch((err) => console.log(err.response));
axios
.get("api/buggy/server-error")
.catch((err) => console.log(err.response));
}

function handleUnauthorized() {
axios.get("/buggy/unauthorized").catch((err) => console.log(err.response));
axios
.get("api/buggy/unauthorized")
.catch((err) => console.log(err.response));
}

function handleBadGuid() {
axios.get("/activities/notaguid").catch((err) => console.log(err.response));
axios
.get("api/activities/notaguid")
.catch((err) => console.log(err.response));
}

function handleValidationError() {
axios.post("/activities", {}).catch((err) => setErrors(err));
axios.post("api/activities", {}).catch((err) => setErrors(err));
}

return (
Expand Down

0 comments on commit 6204304

Please sign in to comment.