Skip to content

Commit

Permalink
feature: updating backend api to use platta version of linkedevents
Browse files Browse the repository at this point in the history
  • Loading branch information
arpargo committed Aug 17, 2023
1 parent 16204b4 commit 0e7525b
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 43 deletions.
78 changes: 39 additions & 39 deletions backend/tet/events/tests/data/linked_events_responses.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"fi": "Testaaja"
},
"location": {
"@id": "https://linkedevents-api.dev.hel.ninja/linkedevents-dev/v1/place/tprek:15417/"
"@id": "https://linkedevents-api-dev.agw.arodevtest.hel.fi/v1/place/tprek:15417/"
},
"description": {
"fi": "test description"
Expand All @@ -20,16 +20,16 @@
"date_published": null,
"keywords": [
{
"@id": "https://linkedevents-api.dev.hel.ninja/linkedevents-dev/v1/keyword/tet:1/"
"@id": "https://linkedevents-api-dev.agw.arodevtest.hel.fi/v1/keyword/tet:1/"
},
{
"@id": "https://linkedevents-api.dev.hel.ninja/linkedevents-dev/v1/keyword/tet:11/"
"@id": "https://linkedevents-api-dev.agw.arodevtest.hel.fi/v1/keyword/tet:11/"
},
{
"@id": "https://linkedevents-api.dev.hel.ninja/linkedevents-dev/v1/keyword/tet:12/"
"@id": "https://linkedevents-api-dev.agw.arodevtest.hel.fi/v1/keyword/tet:12/"
},
{
"@id": "https://linkedevents-api.dev.hel.ninja/linkedevents-dev/v1/keyword/yso:p3971/"
"@id": "https://linkedevents-api-dev.agw.arodevtest.hel.fi/v1/keyword/yso:p3971/"
}
],
"custom_data": {
Expand Down Expand Up @@ -59,20 +59,20 @@
{
"id": "tet:af7w5v5m6e",
"location": {
"@id": "https://linkedevents-api.dev.hel.ninja/linkedevents-dev/v1/place/tprek:15417/"
"@id": "https://linkedevents-api-dev.agw.arodevtest.hel.fi/v1/place/tprek:15417/"
},
"keywords": [
{
"@id": "https://linkedevents-api.dev.hel.ninja/linkedevents-dev/v1/keyword/tet:1/"
"@id": "https://linkedevents-api-dev.agw.arodevtest.hel.fi/v1/keyword/tet:1/"
},
{
"@id": "https://linkedevents-api.dev.hel.ninja/linkedevents-dev/v1/keyword/tet:11/"
"@id": "https://linkedevents-api-dev.agw.arodevtest.hel.fi/v1/keyword/tet:11/"
},
{
"@id": "https://linkedevents-api.dev.hel.ninja/linkedevents-dev/v1/keyword/tet:12/"
"@id": "https://linkedevents-api-dev.agw.arodevtest.hel.fi/v1/keyword/tet:12/"
},
{
"@id": "https://linkedevents-api.dev.hel.ninja/linkedevents-dev/v1/keyword/yso:p3971/"
"@id": "https://linkedevents-api-dev.agw.arodevtest.hel.fi/v1/keyword/yso:p3971/"
}
],
"registration": null,
Expand Down Expand Up @@ -155,7 +155,7 @@
"short_description": {
"fi": "TET-paikan kuvaus"
},
"@id": "https://linkedevents-api.dev.hel.ninja/linkedevents-dev/v1/event/tet:af7w5v5m6e/",
"@id": "https://linkedevents-api-dev.agw.arodevtest.hel.fi/v1/event/tet:af7w5v5m6e/",
"@context": "http://schema.org",
"@type": "Event/LinkedEvent"
}
Expand All @@ -167,11 +167,11 @@
{
"id": "tet:test-user-email-set",
"location": {
"@id": "https://linkedevents-api.dev.hel.ninja/linkedevents-dev/v1/place/tprek:20780/"
"@id": "https://linkedevents-api-dev.agw.arodevtest.hel.fi/v1/place/tprek:20780/"
},
"keywords": [
{
"@id": "https://linkedevents-api.dev.hel.ninja/linkedevents-dev/v1/keyword/tet:2/"
"@id": "https://linkedevents-api-dev.agw.arodevtest.hel.fi/v1/keyword/tet:2/"
}
],
"registration": null,
Expand Down Expand Up @@ -203,7 +203,7 @@
"videos": [],
"in_language": [
{
"@id": "https://linkedevents-api.dev.hel.ninja/linkedevents-dev/v1/language/fi/"
"@id": "https://linkedevents-api-dev.agw.arodevtest.hel.fi/v1/language/fi/"
}
],
"audience": [],
Expand Down Expand Up @@ -252,7 +252,7 @@
"short_description": {
"fi": "xx"
},
"@id": "https://linkedevents-api.dev.hel.ninja/linkedevents-dev/v1/event/tet:af7w4jmjla/",
"@id": "https://linkedevents-api-dev.agw.arodevtest.hel.fi/v1/event/tet:af7w4jmjla/",
"@context": "http://schema.org",
"@type": "Event/LinkedEvent"
}
Expand All @@ -265,35 +265,35 @@
{
"id": "tet:test-user-oid-set",
"location": {
"@id": "https://linkedevents-api.dev.hel.ninja/linkedevents-dev/v1/place/tprek:56379/"
"@id": "https://linkedevents-api-dev.agw.arodevtest.hel.fi/v1/place/tprek:56379/"
},
"keywords": [
{
"@id": "https://linkedevents-api.dev.hel.ninja/linkedevents-dev/v1/keyword/tet:12/"
"@id": "https://linkedevents-api-dev.agw.arodevtest.hel.fi/v1/keyword/tet:12/"
},
{
"@id": "https://linkedevents-api.dev.hel.ninja/linkedevents-dev/v1/keyword/tet:1/"
"@id": "https://linkedevents-api-dev.agw.arodevtest.hel.fi/v1/keyword/tet:1/"
},
{
"@id": "https://linkedevents-api.dev.hel.ninja/linkedevents-dev/v1/keyword/yso:p16557/"
"@id": "https://linkedevents-api-dev.agw.arodevtest.hel.fi/v1/keyword/yso:p16557/"
},
{
"@id": "https://linkedevents-api.dev.hel.ninja/linkedevents-dev/v1/keyword/yso:p9903/"
"@id": "https://linkedevents-api-dev.agw.arodevtest.hel.fi/v1/keyword/yso:p9903/"
},
{
"@id": "https://linkedevents-api.dev.hel.ninja/linkedevents-dev/v1/keyword/yso:p13310/"
"@id": "https://linkedevents-api-dev.agw.arodevtest.hel.fi/v1/keyword/yso:p13310/"
},
{
"@id": "https://linkedevents-api.dev.hel.ninja/linkedevents-dev/v1/keyword/tet:6/"
"@id": "https://linkedevents-api-dev.agw.arodevtest.hel.fi/v1/keyword/tet:6/"
},
{
"@id": "https://linkedevents-api.dev.hel.ninja/linkedevents-dev/v1/keyword/tet:4/"
"@id": "https://linkedevents-api-dev.agw.arodevtest.hel.fi/v1/keyword/tet:4/"
},
{
"@id": "https://linkedevents-api.dev.hel.ninja/linkedevents-dev/v1/keyword/tet:10/"
"@id": "https://linkedevents-api-dev.agw.arodevtest.hel.fi/v1/keyword/tet:10/"
},
{
"@id": "https://linkedevents-api.dev.hel.ninja/linkedevents-dev/v1/keyword/tet:9/"
"@id": "https://linkedevents-api-dev.agw.arodevtest.hel.fi/v1/keyword/tet:9/"
}
],
"registration": null,
Expand Down Expand Up @@ -325,7 +325,7 @@
"videos": [],
"in_language": [
{
"@id": "https://linkedevents-api.dev.hel.ninja/linkedevents-dev/v1/language/fi/"
"@id": "https://linkedevents-api-dev.agw.arodevtest.hel.fi/v1/language/fi/"
}
],
"audience": [],
Expand Down Expand Up @@ -374,7 +374,7 @@
"short_description": {
"fi": "täällä pääset maalaamaan"
},
"@id": "https://linkedevents-api.dev.hel.ninja/linkedevents-dev/v1/event/tet:af7wtenvii/",
"@id": "https://linkedevents-api-dev.agw.arodevtest.hel.fi/v1/event/tet:af7wtenvii/",
"@context": "http://schema.org",
"@type": "Event/LinkedEvent"
}
Expand All @@ -391,11 +391,11 @@
{
"id": "tet:other-user",
"location": {
"@id": "https://linkedevents-api.dev.hel.ninja/linkedevents-dev/v1/place/tprek:8740/"
"@id": "https://linkedevents-api-dev.agw.arodevtest.hel.fi/v1/place/tprek:8740/"
},
"keywords": [
{
"@id": "https://linkedevents-api.dev.hel.ninja/linkedevents-dev/v1/keyword/tet:1/"
"@id": "https://linkedevents-api-dev.agw.arodevtest.hel.fi/v1/keyword/tet:1/"
}
],
"registration": null,
Expand Down Expand Up @@ -427,7 +427,7 @@
"videos": [],
"in_language": [
{
"@id": "https://linkedevents-api.dev.hel.ninja/linkedevents-dev/v1/language/fi/"
"@id": "https://linkedevents-api-dev.agw.arodevtest.hel.fi/v1/language/fi/"
}
],
"audience": [],
Expand Down Expand Up @@ -476,7 +476,7 @@
"short_description": {
"fi": "kuvaus"
},
"@id": "https://linkedevents-api.dev.hel.ninja/linkedevents-dev/v1/event/tet:af7wto6nze/",
"@id": "https://linkedevents-api-dev.agw.arodevtest.hel.fi/v1/event/tet:af7wto6nze/",
"@context": "http://schema.org",
"@type": "Event/LinkedEvent"
}
Expand All @@ -489,11 +489,11 @@
{
"id": "tet:companyuser",
"location": {
"@id": "https://linkedevents-api.dev.hel.ninja/linkedevents-dev/v1/place/tprek:352/"
"@id": "https://linkedevents-api-dev.agw.arodevtest.hel.fi/v1/place/tprek:352/"
},
"keywords": [
{
"@id": "https://linkedevents-api.dev.hel.ninja/linkedevents-dev/v1/keyword/tet:1/"
"@id": "https://linkedevents-api-dev.agw.arodevtest.hel.fi/v1/keyword/tet:1/"
}
],
"registration": null,
Expand Down Expand Up @@ -525,7 +525,7 @@
"videos": [],
"in_language": [
{
"@id": "https://linkedevents-api.dev.hel.ninja/linkedevents-dev/v1/language/fi/"
"@id": "https://linkedevents-api-dev.agw.arodevtest.hel.fi/v1/language/fi/"
}
],
"audience": [],
Expand Down Expand Up @@ -571,7 +571,7 @@
"short_description": {
"fi": "x"
},
"@id": "https://linkedevents-api.dev.hel.ninja/linkedevents-dev/v1/event/tet:af7scpy2de/",
"@id": "https://linkedevents-api-dev.agw.arodevtest.hel.fi/v1/event/tet:af7scpy2de/",
"@context": "http://schema.org",
"@type": "Event/LinkedEvent"
}
Expand All @@ -589,11 +589,11 @@
{
"id": "tet:no-custom-data",
"location": {
"@id": "https://linkedevents-api.dev.hel.ninja/linkedevents-dev/v1/place/tprek:37497/"
"@id": "https://linkedevents-api-dev.agw.arodevtest.hel.fi/v1/place/tprek:37497/"
},
"keywords": [
{
"@id": "https://linkedevents-api.dev.hel.ninja/linkedevents-dev/v1/keyword/tet:1/"
"@id": "https://linkedevents-api-dev.agw.arodevtest.hel.fi/v1/keyword/tet:1/"
}
],
"registration": null,
Expand Down Expand Up @@ -625,7 +625,7 @@
"videos": [],
"in_language": [
{
"@id": "https://linkedevents-api.dev.hel.ninja/linkedevents-dev/v1/language/fi/"
"@id": "https://linkedevents-api-dev.agw.arodevtest.hel.fi/v1/language/fi/"
}
],
"audience": [],
Expand Down Expand Up @@ -665,7 +665,7 @@
"short_description": {
"fi": "kuvaus"
},
"@id": "https://linkedevents-api.dev.hel.ninja/linkedevents-dev/v1/event/tet:af7wjlxpyy/",
"@id": "https://linkedevents-api-dev.agw.arodevtest.hel.fi/v1/event/tet:af7wjlxpyy/",
"@context": "http://schema.org",
"@type": "Event/LinkedEvent"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export const expectWorkingMethodsFromLinkedEvents = (): nock.Scope =>
{
keywords: [
{
'@id': 'https://linkedevents-api.dev.hel.ninja/linkedevents-dev/v1/keyword/tet:4/',
'@id': 'https://linkedevents-api-dev.agw.arodevtest.hel.fi/v1/keyword/tet:4/',
name: {
fi: 'Tee oikeita töitä',
},
Expand All @@ -107,7 +107,7 @@ export const expectAttributesFromLinkedEvents = (): nock.Scope =>
{
keywords: [
{
'@id': 'https://linkedevents-api.dev.hel.ninja/linkedevents-dev/v1/keyword/tet:1/',
'@id': 'https://linkedevents-api-dev.agw.arodevtest.hel.fi/v1/keyword/tet:1/',
name: {
fi: 'Soveltuu näkövammaisille',
},
Expand Down
2 changes: 1 addition & 1 deletion frontend/tet/youth/browser-tests/search.testcafe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ test.skip('user can search and navigate', async (t) => {
const end = faker.date.soon(100, start);
const startDate = formatDate(start);
const endDate = formatDate(end);
// Should find working method https://linkedevents-api.dev.hel.ninja/linkedevents-dev/v1/keyword/tet:2/
// Should find working method https://linkedevents-api-dev.agw.arodevtest.hel.fi/v1/keyword/tet:2/
const workMethodText = 'varjosta';
const languageText = 'suomeksi'; // Should find Finnish language
const searchTerm = faker.lorem.word();
Expand Down
2 changes: 1 addition & 1 deletion frontend/tet/youth/src/backend-api/backend-api.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Axios, { AxiosInstance, AxiosResponse } from 'axios';

export const linkedEventsUrl =
process.env.NEXT_PUBLIC_LINKEDEVENTS_URL || 'https://linkedevents-api.dev.hel.ninja/linkedevents-dev/v1/';
process.env.NEXT_PUBLIC_LINKEDEVENTS_URL || 'https://linkedevents-api-dev.agw.arodevtest.hel.fi/v1/';

export const BackendEndpoint = {
EVENT: 'event/?include=location,keywords&sort=-name',
Expand Down

0 comments on commit 0e7525b

Please sign in to comment.