summaryrefslogtreecommitdiff
path: root/opendc-web/opendc-web-ui/src/data/topology.js
diff options
context:
space:
mode:
authorFabian Mastenbroek <mail.fabianm@gmail.com>2021-07-20 14:09:39 +0200
committerFabian Mastenbroek <mail.fabianm@gmail.com>2021-07-20 14:09:39 +0200
commit6e3ad713111f35fc58bd2b7f1be5aeeb57eb94a8 (patch)
treebcd0466cae9792be5d594ca821d54e843b006423 /opendc-web/opendc-web-ui/src/data/topology.js
parent51c759e74b088d405b63fdb3e374822308d21366 (diff)
refactor(ui): Perform Saga mutations through React Query
This change updates the OpenDC frontend to perform mutations of the topology done in Sagas through the React Query cache, so that non-Saga parts of the application also have their topology queries updated.
Diffstat (limited to 'opendc-web/opendc-web-ui/src/data/topology.js')
-rw-r--r--opendc-web/opendc-web-ui/src/data/topology.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/opendc-web/opendc-web-ui/src/data/topology.js b/opendc-web/opendc-web-ui/src/data/topology.js
index bd4d1e4d..83abb6aa 100644
--- a/opendc-web/opendc-web-ui/src/data/topology.js
+++ b/opendc-web/opendc-web-ui/src/data/topology.js
@@ -46,7 +46,7 @@ export function configureTopologyClient(queryClient, auth) {
})
queryClient.setMutationDefaults('updateTopology', {
mutationFn: (data) => updateTopology(auth, data),
- onSuccess: async (result) => queryClient.setQueryData(['topologies', result._id], result),
+ onSuccess: (result) => queryClient.setQueryData(['topologies', result._id], result),
})
queryClient.setMutationDefaults('deleteTopology', {
mutationFn: (id) => deleteTopology(auth, id),