rename fetch api method

This commit is contained in:
2021-10-27 16:29:16 +02:00
parent a3b203c306
commit 7ad0e2f2c8
2 changed files with 8 additions and 8 deletions

View File

@@ -1,5 +1,5 @@
import { createStore } from 'vuex'
import { getHouseholdByPerson, getCoursesByPerson, getRelationship } from './api'
import { getHouseholdByPerson, getCoursesByPerson, getRelationshipByPerson } from './api'
import { adapt2vis } from './vis-network'
const debug = process.env.NODE_ENV !== 'production'
@@ -208,9 +208,9 @@ const store = createStore({
*/
fetchRelationship({ commit, getters }, person) {
console.log('fetchRelationship', person)
getRelationship(person)
getRelationshipByPerson(person)
.then(relationship => new Promise(resolve => {
console.log('getRelationship', relationship)
console.log('getRelationshipByPerson', relationship)
commit('addRelationship', relationship)
resolve()
}))