Skip to content

Commit

Permalink
Merge pull request #17 from CLIMB-TRE/development
Browse files Browse the repository at this point in the history
Add trailing slashes to prevent unnecessary 301 redirects
  • Loading branch information
tombch authored Jul 2, 2024
2 parents ce40bcc + 3a57c9f commit 9ec5e6c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions lib/Onyx.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import LoadingAlert from "./components/LoadingAlert";
import "./Onyx.css";
import "./bootstrap.css";

const VERSION = "0.10.1";
const VERSION = "0.10.2";

type ProjectField = {
type: string;
Expand Down Expand Up @@ -481,7 +481,7 @@ function App(props: OnyxProps) {
queryKey: ["projects"],
queryFn: async () => {
return props
.httpPathHandler("projects")
.httpPathHandler("projects/")
.then((response) => response.json())
.then((data) => {
return [
Expand All @@ -507,7 +507,7 @@ function App(props: OnyxProps) {
queryKey: ["types"],
queryFn: async () => {
return props
.httpPathHandler("projects/types")
.httpPathHandler("projects/types/")
.then((response) => response.json())
.then((data) => {
return new Map(
Expand All @@ -525,7 +525,7 @@ function App(props: OnyxProps) {
queryKey: ["lookups"],
queryFn: async () => {
return props
.httpPathHandler("projects/lookups")
.httpPathHandler("projects/lookups/")
.then((response) => response.json())
.then((data) => {
return new Map(
Expand All @@ -549,7 +549,7 @@ function App(props: OnyxProps) {
queryKey: ["fields", project],
queryFn: async () => {
return props
.httpPathHandler("projects/" + project + "/fields")
.httpPathHandler("projects/" + project + "/fields/")
.then((response) => response.json())
.then((data) => {
const fields = flattenFields(data.data.fields);
Expand Down
2 changes: 1 addition & 1 deletion lib/components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ function Header(props: HeaderProps) {
queryKey: ["profile"],
queryFn: async () => {
return props
.httpPathHandler("accounts/profile")
.httpPathHandler("accounts/profile/")
.then((response) => response.json())
.then((data) => {
return { username: data.data.username, site: data.data.site };
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "climb-onyx-gui",
"version": "0.10.1",
"version": "0.10.2",
"type": "module",
"main": "dist/climb-onyx-gui.js",
"types": "dist/main.d.ts",
Expand Down

0 comments on commit 9ec5e6c

Please sign in to comment.