Skip to content

Commit

Permalink
Added v1 suffix to public api path (#54)
Browse files Browse the repository at this point in the history
  • Loading branch information
theorm authored Nov 20, 2024
1 parent 988efce commit 942bbee
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docker-build-latest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,5 +85,5 @@ jobs:
PUBLIC_GIT_TAG=${{ env.PUBLIC_GIT_TAG }}
PUBLIC_IMPRESSO_DATALAB_SITE=${{ secrets.IMPRESSO_DATALAB_SITE }}
PUBLIC_IMPRESSO_DATALAB_BASE=${{ secrets.PUBLIC_IMPRESSO_DATALAB_BASE }}
PUBLIC_IMPRESSO_API_PATH=/public-api
PUBLIC_IMPRESSO_API_PATH=/public-api/v1
PUBLIC_IMPRESSO_WS_API_PATH=/api/socket.io
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ run-dev:
PUBLIC_GIT_BRANCH=$(shell git rev-parse --abbrev-ref HEAD) \
PUBLIC_BUILD_DATE=$(shell date -u +'%Y-%m-%dT%H:%M:%SZ') \
PUBLIC_GIT_REMOTE=$(shell git config --get remote.origin.url) \
PUBLIC_IMPRESSO_API_PATH="/public-api" \
PUBLIC_IMPRESSO_API_PATH="/public-api/v1" \
PUBLIC_IMPRESSO_WS_API_PATH="/api/socket.io" \
PUBLIC_IMPRESSO_DATALAB_BASE="/datalab" \
PUBLIC_IMPRESSO_DATALAB_SITE="https://impresso-project.ch" \
Expand All @@ -20,7 +20,7 @@ build-dev:
PUBLIC_GIT_BRANCH=$(shell git rev-parse --abbrev-ref HEAD) \
PUBLIC_BUILD_DATE=$(shell date -u +'%Y-%m-%dT%H:%M:%SZ') \
PUBLIC_GIT_REMOTE=$(shell git config --get remote.origin.url) \
PUBLIC_IMPRESSO_API_PATH="/public-api" \
PUBLIC_IMPRESSO_API_PATH="/public-api/v1" \
PUBLIC_IMPRESSO_WS_API_PATH="/socket.io" \
PUBLIC_IMPRESSO_DATALAB_BASE="/datalab" \
PUBLIC_IMPRESSO_DATALAB_SITE="https://impresso-project.ch" \
Expand All @@ -36,7 +36,7 @@ build:
--build-arg PUBLIC_GIT_BRANCH=$(shell git rev-parse --abbrev-ref HEAD) \
--build-arg PUBLIC_BUILD_DATE=$(shell date -u +'%Y-%m-%dT%H:%M:%SZ') \
--build-arg PUBLIC_GIT_REMOTE=$(shell git config --get remote.origin.url) \
--build-arg PUBLIC_IMPRESSO_API_PATH="/public-api" \
--build-arg PUBLIC_IMPRESSO_API_PATH="/public-api/v1" \
--build-arg PUBLIC_IMPRESSO_WS_API_PATH="/api/socket.io" \
--build-arg PUBLIC_IMPRESSO_DATALAB_BASE="/datalab" \
--build-arg PUBLIC_IMPRESSO_DATALAB_SITE="https://impresso-project.ch" \
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ The Impresso Datalab is built using AstroJS and MDX. The Impresso Datalab is con
npm install

PUBLIC_IMPRESSO_API_HOST=http://ws.localhost \
PUBLIC_IMPRESSO_API_PATH=/public-api \
PUBLIC_IMPRESSO_API_PATH=/public-api/v1 \
PUBLIC_IMPRESSO_WS_API_HOST=http://api.localhost \
PUBLIC_IMPRESSO_WS_API_PATH=/api/socket.io \
npm run dev
Expand Down
4 changes: 2 additions & 2 deletions astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ const WsApiPath = process.env.PUBLIC_IMPRESSO_WS_API_PATH ?? "/api/socket.io"

const PublicApiTarget =
process.env.PUBLIC_IMPRESSO_API_HOST ?? "http://localhost"
const PublicApiPath = process.env.PUBLIC_IMPRESSO_API_PATH ?? "/public-api"
const PublicApiPath = process.env.PUBLIC_IMPRESSO_API_PATH ?? "/public-api/v1"

// these values are relevant only when the proxy is used with different paths, e.g; for a local instance of impresso middle layer
const ProxyPublicApiPath = process.env.PUBLIC_IMPRESSO_API_PATH ?? "/public-api"
const ProxyPublicApiPath = process.env.PUBLIC_IMPRESSO_API_PATH ?? "/public-api/v1"
const ProxyWsApiPath =
process.env.PUBLIC_IMPRESSO_WS_API_PATH ?? "/api/socket.io"

Expand Down
2 changes: 1 addition & 1 deletion src/components/DatalabDiagram.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ const DatalabDiagram: React.FC<DatalabDiagramProps> = ({
className="font-weight bold h5"
>
<a
href="https://dev.impresso-project.ch/public-api/docs/"
href="https://dev.impresso-project.ch/public-api/v1/docs/"
target="_blank"
>
Impresso Public API
Expand Down
2 changes: 1 addition & 1 deletion src/components/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ const Footer: React.FC<{
<Col md="6" lg="3" xxl="3">
<p>
Check out our{" "}
<a href="/public-api/docs">Rest API documentation</a> or the
<a href="/public-api/v1/docs">Rest API documentation</a> or the
documentation of our{" "}
<a href="https://pypi.org/project/impresso">
Impresso Python Library
Expand Down

0 comments on commit 942bbee

Please sign in to comment.