Skip to content

Commit

Permalink
Point openverse frontend to api.openverse.org (#4228)
Browse files Browse the repository at this point in the history
  • Loading branch information
sarayourfriend authored Apr 30, 2024
1 parent 2051936 commit a85356b
Show file tree
Hide file tree
Showing 286 changed files with 745 additions and 745 deletions.
2 changes: 1 addition & 1 deletion api/justfile
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ doc-test: wait-up
#########

# Build and run the NGINX image locally
nginx upstream_url='api.openverse.engineering':
nginx upstream_url='api.openverse.org':
# upstream_url can also be set to 172.17.0.1:50280 for local testing
docker build --target nginx . -t openverse-api_nginx:latest
@echo "--> NGINX server will be run at http://localhost:9090, upstream at {{ upstream_url }}"
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/composables/use-pages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export default function usePages() {
{
id: "api",
name: "navigation.api",
link: "https://api.openverse.engineering/v1/",
link: "https://api.openverse.org/v1/",
},
{
id: "terms",
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/utils/env.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const apiUrl = process.env.API_URL ?? "https://api.openverse.engineering/"
const apiUrl = process.env.API_URL ?? "https://api.openverse.org/"

/**
* Default environment variables are set on this key. Defaults are fallbacks to existing env vars.
Expand Down
120 changes: 60 additions & 60 deletions frontend/test/playwright/e2e/resources/last_page.json

Large diffs are not rendered by default.

160 changes: 80 additions & 80 deletions frontend/test/playwright/e2e/resources/mock_audio_data.json

Large diffs are not rendered by default.

120 changes: 60 additions & 60 deletions frontend/test/playwright/e2e/resources/mock_image_data.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions frontend/test/proxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const talkback = require("talkback")
/** @typedef {ReturnType<TalkbackOptions['tapeDecorator']>} Tape */

const port = 49153
const host = "https://api.openverse.engineering"
const host = "https://api.openverse.org"

const urlPatterns = {
search: /\/(?<mediaType>images|audio|video|model-3d)\/*\?(?<query>[\w&=+]+)/,
Expand Down Expand Up @@ -143,7 +143,7 @@ const tapeDecorator = (tape) => {
const responseBody = bodyUtil.read(tape.res.body).toString()

const fixedResponseBody = responseBody.replace(
/https?:\/\/api.openverse.engineering/g,
/https?:\/\/api.openverse.org/g,
`http://localhost:${port}`
)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
meta: {
createdAt: '2024-01-13T18:32:28.378Z',
host: 'https://api.openverse.engineering',
host: 'https://api.openverse.org',
resHumanReadable: true,
resUncompressed: true,
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
meta: {
createdAt: '2024-01-01T05:20:46.176Z',
host: 'https://api.openverse.engineering',
host: 'https://api.openverse.org',
resHumanReadable: true,
resUncompressed: true,
},
Expand Down Expand Up @@ -122,4 +122,4 @@
unstable__sensitivity: [],
},
},
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
meta: {
createdAt: '2023-03-15T13:00:33.683Z',
host: 'https://api.openverse.engineering',
host: 'https://api.openverse.org',
resHumanReadable: true,
resUncompressed: true,
},
Expand Down Expand Up @@ -152,4 +152,4 @@
waveform: 'http://localhost:49153/v1/audio/2536a2ba-1eb3-4f40-9347-29534d029b5c/waveform/',
},
},
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
meta: {
createdAt: '2022-08-27T13:36:01.022Z',
host: 'https://api.openverse.engineering',
host: 'https://api.openverse.org',
resHumanReadable: true,
resUncompressed: true,
},
Expand Down Expand Up @@ -321,4 +321,4 @@
],
},
},
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
meta: {
createdAt: '2022-08-27T13:36:52.683Z',
host: 'https://api.openverse.engineering',
host: 'https://api.openverse.org',
resHumanReadable: true,
resUncompressed: true,
},
Expand Down Expand Up @@ -314,4 +314,4 @@
],
},
},
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
meta: {
createdAt: '2022-09-01T15:41:17.365Z',
host: 'https://api.openverse.engineering',
host: 'https://api.openverse.org',
resHumanReadable: true,
resUncompressed: true,
},
Expand Down Expand Up @@ -326,4 +326,4 @@
],
},
},
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
meta: {
createdAt: '2022-08-19T07:14:04.537Z',
host: 'https://api.openverse.engineering',
host: 'https://api.openverse.org',
resHumanReadable: true,
},
req: {
Expand Down Expand Up @@ -295,4 +295,4 @@
],
},
},
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
meta: {
createdAt: '2022-08-27T13:37:08.794Z',
host: 'https://api.openverse.engineering',
host: 'https://api.openverse.org',
resHumanReadable: true,
resUncompressed: true,
},
Expand Down Expand Up @@ -302,4 +302,4 @@
],
},
},
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
meta: {
createdAt: '2023-03-15T13:00:31.824Z',
host: 'https://api.openverse.engineering',
host: 'https://api.openverse.org',
resHumanReadable: true,
resUncompressed: true,
},
Expand Down Expand Up @@ -144,4 +144,4 @@
waveform: 'http://localhost:49153/v1/audio/789a34fe-3931-4a4b-ac72-cbbd6782edee/waveform/',
},
},
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
meta: {
createdAt: '2024-01-12T04:54:16.856Z',
host: 'https://api.openverse.engineering',
host: 'https://api.openverse.org',
resHumanReadable: true,
resUncompressed: true,
},
Expand Down Expand Up @@ -150,4 +150,4 @@
unstable__sensitivity: [],
},
},
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
meta: {
createdAt: '2024-01-01T05:20:51.097Z',
host: 'https://api.openverse.engineering',
host: 'https://api.openverse.org',
resHumanReadable: true,
resUncompressed: true,
},
Expand Down Expand Up @@ -153,4 +153,4 @@
unstable__sensitivity: [],
},
},
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
meta: {
createdAt: '2022-09-01T15:41:13.916Z',
host: 'https://api.openverse.engineering',
host: 'https://api.openverse.org',
resHumanReadable: true,
resUncompressed: true,
},
Expand Down Expand Up @@ -307,4 +307,4 @@
],
},
},
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
meta: {
createdAt: '2024-02-19T17:03:23.360Z',
host: 'https://api.openverse.engineering',
host: 'https://api.openverse.org',
resHumanReadable: true,
resUncompressed: true,
},
Expand Down Expand Up @@ -254,4 +254,4 @@
unstable__sensitivity: [],
},
},
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
meta: {
createdAt: '2022-03-28T15:14:01.070Z',
host: 'https://api.openverse.engineering',
host: 'https://api.openverse.org',
resHumanReadable: true,
resUncompressed: true,
},
Expand Down Expand Up @@ -117,4 +117,4 @@
related_url: 'http://localhost:49153/v1/images/53841492-9703-4892-96b4-10297dd84ed0/related/',
},
},
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
meta: {
createdAt: '2022-04-11T16:42:23.591Z',
host: 'https://api.openverse.engineering',
host: 'https://api.openverse.org',
resHumanReadable: true,
resUncompressed: true,
},
Expand Down Expand Up @@ -345,4 +345,4 @@
related_url: 'http://localhost:49153/v1/images/802d76cd-84cf-45bc-81ac-610331dab420/related/',
},
},
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
meta: {
createdAt: '2022-03-28T15:06:10.273Z',
host: 'https://api.openverse.engineering',
host: 'https://api.openverse.org',
resHumanReadable: true,
resUncompressed: true,
},
Expand Down Expand Up @@ -190,4 +190,4 @@
related_url: 'http://localhost:49153/v1/images/cfa45160-a7be-4911-9b9f-4e66678ec7f7/related/',
},
},
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
meta: {
createdAt: '2023-03-15T07:25:42.282Z',
host: 'https://api.openverse.engineering',
host: 'https://api.openverse.org',
resHumanReadable: true,
},
req: {
Expand Down Expand Up @@ -105,4 +105,4 @@
related_url: 'http://localhost:49153/v1/images/da5cb478-c093-4d62-b721-cda18797e3fb/related/',
},
},
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
meta: {
createdAt: '2022-08-26T12:51:39.521Z',
host: 'https://api.openverse.engineering',
host: 'https://api.openverse.org',
resHumanReadable: true,
resUncompressed: true,
},
Expand Down Expand Up @@ -110,4 +110,4 @@
related_url: 'http://localhost:49153/v1/images/da5cb478-c093-4d62-b721-cda18797e3fb/related/',
},
},
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
meta: {
createdAt: '2022-08-26T12:51:39.521Z',
host: 'https://api.openverse.engineering',
host: 'https://api.openverse.org',
resHumanReadable: true,
resUncompressed: true,
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
meta: {
createdAt: '2022-08-26T12:51:39.521Z',
host: 'https://api.openverse.engineering',
host: 'https://api.openverse.org',
resHumanReadable: true,
resUncompressed: true,
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
meta: {
createdAt: '2023-07-10T13:17:16.682Z',
host: 'https://api.openverse.engineering',
host: 'https://api.openverse.org',
resHumanReadable: true,
},
req: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
meta: {
createdAt: '2022-08-26T12:51:39.521Z',
host: 'https://api.openverse.engineering',
host: 'https://api.openverse.org',
resHumanReadable: true,
resUncompressed: true,
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
meta: {
createdAt: '2024-01-11T12:13:25.034Z',
host: 'https://api.openverse.engineering',
host: 'https://api.openverse.org',
resHumanReadable: true,
resUncompressed: true,
},
Expand Down Expand Up @@ -126,4 +126,4 @@
unstable__sensitivity: [],
},
},
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
meta: {
createdAt: '2024-01-01T05:20:46.176Z',
host: 'https://api.openverse.engineering',
host: 'https://api.openverse.org',
resHumanReadable: true,
resUncompressed: true,
},
Expand Down Expand Up @@ -126,4 +126,4 @@
unstable__sensitivity: [],
},
},
}
}
Loading

0 comments on commit a85356b

Please sign in to comment.