Skip to content

Commit

Permalink
distinguish between loading initial composition other forms
Browse files Browse the repository at this point in the history
  • Loading branch information
paulr34 committed Oct 1, 2024
1 parent 5b64118 commit 1159c7a
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src-electron/rest/endpoint.js
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ function httpPatchEndpointType(db) {
}
exports.get = [
{
uri: restApi.uri.loadComposition,
uri: restApi.uri.loadInitialComposition,
callback: httpGetInitialComposition
}
]
Expand Down
2 changes: 1 addition & 1 deletion src-shared/rest-api.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ const uri = {
reloadSession: '/zcl/reloadSession',
init: '/init',
forcedExternal: '/zcl/forcedExternal',
loadComposition: '/zcl/loadComposition'
loadInitialComposition: '/zcl/loadInitialComposition'
}

const uiMode = {
Expand Down
2 changes: 1 addition & 1 deletion src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ export default defineComponent({
this.$store.commit('zap/toggleShowExceptionIcon', false)
},
async loadInitialEndpoints() {
let endpoint = await this.$store.dispatch('zap/loadComposition')
let endpoint = await this.$store.dispatch('zap/loadInitialComposition')
if (endpoint) {
this.$store.dispatch('zap/updateSelectedEndpointType', {
endpointType: this.endpointType[endpoint.id],
Expand Down
4 changes: 2 additions & 2 deletions src/store/zap/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -460,8 +460,8 @@ export function updateEndpoint(context, endpoint) {
* @param {Object} context - The Vuex context object.
* @returns {Promise<void>} - A promise that resolves when the composition is loaded.
*/
export async function loadComposition(context) {
let res = await axiosRequests.$serverGet(restApi.uri.loadComposition)
export async function loadInitialComposition(context) {
let res = await axiosRequests.$serverGet(restApi.uri.loadInitialComposition)

// Check if the response data is empty or undefined
if (!res.data) {
Expand Down

0 comments on commit 1159c7a

Please sign in to comment.