Skip to content

Commit

Permalink
Some small fixes and only fix getPublicationAttachments front-end
Browse files Browse the repository at this point in the history
  • Loading branch information
WilcoLouwerse committed Aug 12, 2024
1 parent 8ae2428 commit df9f3c4
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions lib/Db/Attachment.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ public function jsonSerialize(): array
'hash' => $this->hash,
'anonymization' => $this->anonymization,
'language' => $this->language,
'modified' => $this->modified->format('c'),
'published' => $this->published->format('c'),
'modified' => $this->modified?->format('c'),
'published' => $this->published?->format('c'),
'license' => $this->license,
];

Expand Down
2 changes: 1 addition & 1 deletion lib/Db/Listing.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public function jsonSerialize(): array
'metadata' => $this->metadata,
'catalogId' => $this->catalogId,
'status' => $this->status,
'lastSync' => $this->lastSync->format('c'),
'lastSync' => $this->lastSync?->format('c'),
'default' => $this->default,
'available' => $this->available,
'organisation'=> json_decode($this->organisation, true),
Expand Down
8 changes: 4 additions & 4 deletions src/store/modules/publication.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ export const usePublicationStore = defineStore(
},
)
},
getPublicationAttachments(publication) { // @todo this might belong in a service?
getPublicationAttachments(publicationId) {
fetch(
'/index.php/apps/opencatalogi/api/attachments',
`/index.php/apps/opencatalogi/api/publications/${publicationId}/attachments`,
{
method: 'GET',
},
Expand Down Expand Up @@ -187,9 +187,9 @@ export const usePublicationStore = defineStore(
})
},
/* istanbul ignore next */ // ignore this for Jest until moved into a service
getPublicationAttachments(publication) { // @todo this might belong in a service?
getPublicationAttachments(publicationId) {
fetch(
'/index.php/apps/opencatalogi/api/attachments',
'/index.php/apps/opencatalogi/api/publications/' + publicationId + '/attachments',
{
method: 'GET',
},
Expand Down
2 changes: 1 addition & 1 deletion src/views/publications/PublicationDetail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ export default {
// this.oldZaakId = id
this.fetchCatalogi(data.catalogi?.id)
this.fetchMetaData(data.metaData?.id)
publicationStore.getPublicationAttachments()
publicationStore.getPublicationAttachments(id)
// this.loading = false
})
})
Expand Down

0 comments on commit df9f3c4

Please sign in to comment.