Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
alexlux58 committed Jan 13, 2024
1 parent 334511b commit c599a02
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 16 deletions.
2 changes: 1 addition & 1 deletion API/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
builder.Services.AddIdentityServices(builder.Configuration);

// Configure Kestrel server to listen on all interfaces on port 8080
builder.WebHost.UseUrls("http://*:8080");
// builder.WebHost.UseUrls("http://*:8080");

var app = builder.Build();

Expand Down
2 changes: 1 addition & 1 deletion frontend/client-app/src/app/layout/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const Navbar = () => {
Reactivites
</Menu.Item>
<Menu.Item name="Activities" as={NavLink} to="/activities" />
{/* <Menu.Item name="Errors" as={NavLink} to="/errors" /> */}
<Menu.Item name="Errors" as={NavLink} to="/errors" />
<Menu.Item>
<Button
positive
Expand Down
20 changes: 6 additions & 14 deletions frontend/client-app/src/components/errors/TestError.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,35 +9,27 @@ export default function TestErrors() {
// const baseUrl = import.meta.env.VITE_API_URL;

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

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

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

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

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

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

return (
Expand Down

0 comments on commit c599a02

Please sign in to comment.