Skip to content

Commit

Permalink
Fix for new openatlas version
Browse files Browse the repository at this point in the history
  • Loading branch information
Mocca101 committed Jan 8, 2024
1 parent 0a2ca5a commit b0b88a3
Show file tree
Hide file tree
Showing 15 changed files with 34 additions and 37 deletions.
37 changes: 18 additions & 19 deletions assets/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
"info": {
"title": "OpenAtlas Api",
"description": "This is the unstable version of the OpenAtlas API",
"termsOfService": "https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html",
"version": "0.3"
"termsOfService": "https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html"
},
"servers": [
{
Expand All @@ -27,7 +26,7 @@
}
],
"paths": {
"/api/0.3/cidoc_class/{cidoc_class}": {
"/api/cidoc_class/{cidoc_class}": {
"get": {
"tags": [
"Entities"
Expand Down Expand Up @@ -242,7 +241,7 @@
}
}
},
"/api/0.3/classes/": {
"/api/classes/": {
"get": {
"tags": [
"Content"
Expand All @@ -269,7 +268,7 @@
}
}
},
"/api/0.3/content/": {
"/api/content/": {
"get": {
"tags": [
"Content"
Expand Down Expand Up @@ -321,7 +320,7 @@
}
}
},
"/api/0.3/entities_linked_to_entity/{id_}": {
"/api/entities_linked_to_entity/{id_}": {
"get": {
"tags": [
"Entities"
Expand Down Expand Up @@ -536,7 +535,7 @@
}
}
},
"/api/0.3/entity/{id_}": {
"/api/entity/{id_}": {
"get": {
"tags": [
"Entities"
Expand Down Expand Up @@ -635,7 +634,7 @@
}
}
},
"/api/0.3/geometric_entities/": {
"/api/geometric_entities/": {
"get": {
"tags": [
"Content"
Expand Down Expand Up @@ -683,7 +682,7 @@
}
}
},
"/api/0.3/latest/{latest}": {
"/api/latest/{latest}": {
"get": {
"tags": [
"Entities"
Expand Down Expand Up @@ -782,7 +781,7 @@
}
}
},
"/api/0.3/query/": {
"/api/query/": {
"get": {
"tags": [
"Entities"
Expand Down Expand Up @@ -1061,7 +1060,7 @@
}
}
},
"/api/0.3/subunits/{id_}": {
"/api/subunits/{id_}": {
"get": {
"tags": [
"Nodes"
Expand Down Expand Up @@ -1135,7 +1134,7 @@
}
}
},
"/api/0.3/system_class/{system_class}": {
"/api/system_class/{system_class}": {
"get": {
"tags": [
"Entities"
Expand Down Expand Up @@ -1366,7 +1365,7 @@
}
}
},
"/api/0.3/system_class_count/": {
"/api/system_class_count/": {
"get": {
"tags": [
"Content"
Expand All @@ -1389,7 +1388,7 @@
}
}
},
"/api/0.3/type_entities/{id_}": {
"/api/type_entities/{id_}": {
"get": {
"tags": [
"Entities"
Expand Down Expand Up @@ -1604,7 +1603,7 @@
}
}
},
"/api/0.3/type_entities_all/{id_}": {
"/api/type_entities_all/{id_}": {
"get": {
"tags": [
"Entities"
Expand Down Expand Up @@ -1819,7 +1818,7 @@
}
}
},
"/api/0.3/type_overview/": {
"/api/type_overview/": {
"get": {
"tags": [
"Nodes"
Expand Down Expand Up @@ -1856,7 +1855,7 @@
}
}
},
"/api/0.3/type_tree/": {
"/api/type_tree/": {
"get": {
"tags": [
"Nodes"
Expand Down Expand Up @@ -1893,7 +1892,7 @@
}
}
},
"/api/0.3/view_class/{view_class}": {
"/api/view_class/{view_class}": {
"get": {
"tags": [
"Entities"
Expand Down Expand Up @@ -3418,4 +3417,4 @@
}
}
}
}
}
2 changes: 1 addition & 1 deletion components/BibliographyParagraph.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export default {
async fetch() {
try {
// eslint-disable-next-line no-underscore-dangle
const p = await this.$api.Entities.get_api_0_3_entity__id__({
const p = await this.$api.Entities.get_api_entity__id__({
id_: this.id,
});
// eslint-disable-next-line prefer-destructuring
Expand Down
4 changes: 2 additions & 2 deletions components/CollectionBox.vue
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export default {
},
async mounted() {
const p = await this.$api.Entities.get_api_0_3_entity__id__({
const p = await this.$api.Entities.get_api_entity__id__({
id_: this.collection.id,
});
this.collectionDetails = p.body.features[0];
Expand All @@ -78,7 +78,7 @@ export default {
async handler() {
if (!this.image) return;
const q = await this.$api.Entities.get_api_0_3_entity__id__({
const q = await this.$api.Entities.get_api_entity__id__({
id_: this.image['@id'].split('/').at(-1),
show: 'description'
});
Expand Down
2 changes: 1 addition & 1 deletion components/DataMap.vue
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export default {
async loadAllFromApi(){
let localItems = [];
const p = await this.$api.Entities.get_api_0_3_query_({
const p = await this.$api.Entities.get_api_query_({
view_classes: this.customQuery?.view_classes || this.query?.view_classes,
search: this.customQuery?.search || this.query?.search,
limit: 0,
Expand Down
2 changes: 1 addition & 1 deletion components/FilterWindow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ export default {
setCodes: 'query/setCodes',
}),
async loadAllTypesFromBackend() {
const p = await this.$api.Nodes.get_api_0_3_type_tree_();
const p = await this.$api.Nodes.get_api_type_tree_();
const typeTree = Object.values(p.body.typeTree);
this.filterElements.forEach((filterElement) => {
Expand Down
4 changes: 2 additions & 2 deletions components/ImageCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ export default {
name: "ImageCard",
async fetch(){
if(!this.item.features[0].depictions?.[0]) return
const p = await this.$api.Entities.get_api_0_3_entity__id__({
const p = await this.$api.Entities.get_api_entity__id__({
id_: this.item.features[0].depictions?.[0]['@id'].split('/').at(-1),
show: 'description'
});
this.description = p?.body?.features?.[0]?.descriptions?.[0]?.value
},
props: ['item', 'color'],
data() {
Expand Down
2 changes: 1 addition & 1 deletion components/ImageCollage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default {
this.loading = true;
try {
// eslint-disable-next-line no-underscore-dangle
const p = await this.$api.Entities.get_api_0_3_type_entities__id__({
const p = await this.$api.Entities.get_api_type_entities__id__({
id_: this.collectionId,
limit: 0,
show: 'depictions'
Expand Down
2 changes: 1 addition & 1 deletion components/ImageViewer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ export default {
images: {
async handler() {
for (const image of this.images) {
const p = await this.$api.Entities.get_api_0_3_entity__id__({
const p = await this.$api.Entities.get_api_entity__id__({
id_: image['@id'].split('/').at(-1),
show: 'description'
});
Expand Down
2 changes: 1 addition & 1 deletion components/SinglePageLayout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ export default {
// eslint-disable-next-line no-restricted-syntax
for (const id of this.item.relations) {
// eslint-disable-next-line no-await-in-loop,no-underscore-dangle
const ri = await this.$api.Entities.get_api_0_3_entity__id__({
const ri = await this.$api.Entities.get_api_entity__id__({
id_: id.relationTo.split('/').splice(-1, 1),
});
this.related.push(ri.body);
Expand Down
4 changes: 1 addition & 3 deletions layouts/default.vue
Original file line number Diff line number Diff line change
Expand Up @@ -323,9 +323,7 @@ export default {
},
},
async mounted() {
const content = await this.$api.Content.get_api_0_3_content_({});
this.$store.commit('app/setSiteName', content.body['site-name']);
this.title = content.body['site-name'];
this.title = 'Shahi';
window.addEventListener('scroll', this.onScroll);
},
beforeDestroy() {
Expand Down
2 changes: 1 addition & 1 deletion pages/collections/_q.vue
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export default {
} = this.options;
try {
// eslint-disable-next-line no-underscore-dangle
const p = await this.$api.Entities.get_api_0_3_type_entities__id__({
const p = await this.$api.Entities.get_api_type_entities__id__({
id_: this.$route.params.q,
limit: itemsPerPage,
Expand Down
2 changes: 1 addition & 1 deletion pages/collections/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export default {
};
},
async mounted() {
const p = await this.$api.Nodes.get_api_0_3_type_tree_();
const p = await this.$api.Nodes.get_api_type_tree_();
const typeTree = Object.values(p.body.typeTree);
this.collections = typeTree.filter((x) => x?.root?.[0] === 1969);
},
Expand Down
2 changes: 1 addition & 1 deletion pages/data.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export default {
} = this.options;
try {
// eslint-disable-next-line no-underscore-dangle
const p = await this.$api.Entities.get_api_0_3_query_({
const p = await this.$api.Entities.get_api_query_({
limit: itemsPerPage,
first: this.itemIndex[page - 1] ? this.itemIndex[page - 1].startId : null,
view_classes: this.query?.view_classes,
Expand Down
2 changes: 1 addition & 1 deletion pages/single/_id.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default {
async fetch() {
this.loading = true;
// eslint-disable-next-line no-underscore-dangle
const p = await this.$api.Entities.get_api_0_3_entity__id__({
const p = await this.$api.Entities.get_api_entity__id__({
id_: this.$route.params.id,
});
// eslint-disable-next-line prefer-destructuring
Expand Down
2 changes: 1 addition & 1 deletion pages/sourcebook/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export default {
};
},
async mounted() {
const p = await this.$api.Entities.get_api_0_3_entity__id__({
const p = await this.$api.Entities.get_api_entity__id__({
id_: 2267,
});
this.sourcebook = p.body.features[0];
Expand Down

0 comments on commit b0b88a3

Please sign in to comment.