Skip to content

Commit

Permalink
fix: reload page without cache when image changed for projects and or…
Browse files Browse the repository at this point in the history
…ganisations
  • Loading branch information
ewan-escience committed Oct 20, 2022
1 parent 595ad3f commit bb1a6a5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// SPDX-FileCopyrightText: 2022 Dusan Mijatovic (dv4all)
// SPDX-FileCopyrightText: 2022 Ewan Cahen (Netherlands eScience Center) <e.cahen@esciencecenter.nl>
// SPDX-FileCopyrightText: 2022 Netherlands eScience Center
// SPDX-FileCopyrightText: 2022 dv4all
//
// SPDX-License-Identifier: Apache-2.0
Expand Down Expand Up @@ -43,6 +45,9 @@ export default function AutosaveProjectImage() {
mime_type,
token
})
await fetch(`/image/rpc/get_project_image?id=${form_id}`, {cache: 'reload'})
// @ts-ignore
location.reload(true)
} else {
// add new image
resp = await addImage({
Expand Down
3 changes: 3 additions & 0 deletions frontend/utils/editOrganisation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,9 @@ export async function uploadOrganisationLogo({id, data, mime_type, token}:
mime_type
})
})
await fetch(`/image/rpc/get_logo?id=${id}`, {cache: 'reload'})
// @ts-ignore
location.reload(true)
return extractReturnMessage(resp)
} catch (e: any) {
return {
Expand Down

0 comments on commit bb1a6a5

Please sign in to comment.