Skip to content

Commit

Permalink
Merge pull request #7108 from davidwatkins73/waltz-7083-aliases
Browse files Browse the repository at this point in the history
Fixing missing alias store
  • Loading branch information
jessica-woodland-scott-db authored Jul 11, 2024
2 parents 9a8d5e2 + ea8b829 commit ed8eba1
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions waltz-ng/client/svelte-stores/entity-alias-store.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/*
* Waltz - Enterprise Architecture
* Copyright (C) 2016, 2017, 2018, 2019 Waltz open source project
* See README.md for more information
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific
*
*/

import {remote} from "./remote";

export function mkEntityAliasStore() {

const fetchForEntityReference = (ref, force = false) => remote
.fetchViewList(
"GET",
`api/entity/alias/${ref.kind}/${ref.id}`,
[],
{force});

const updateForEntityReference = (ref, aliases = []) => remote
.execute(
"POST",
`api/entity/alias/${ref.kind}/${ref.id}`,
aliases);

return {
fetchForEntityReference,
updateForEntityReference
};
}

export const entityAliasStore = mkEntityAliasStore();

0 comments on commit ed8eba1

Please sign in to comment.