Clean up code

This commit is contained in:
Ramon Wenger 2020-06-18 11:54:02 +02:00
parent b32cb89a85
commit b5fbc562b5
2 changed files with 3 additions and 3 deletions

View File

@ -57,8 +57,8 @@
}
},
update(store, {data: {updateSchoolClass: {schoolClass: {name}}}}) {
let query = MY_SCHOOL_CLASS_QUERY;
let data = store.readQuery({query});
const query = MY_SCHOOL_CLASS_QUERY;
const data = store.readQuery({query});
data.me.selectedClass.name = name;
store.writeQuery({query, data});
}

View File

@ -117,7 +117,7 @@
},
update(store, {data: {updateLastTopic: {topic}}}) {
if (topic) {
let query = ME_QUERY;
const query = ME_QUERY;
const data = store.readQuery({query});
if (data) {
data.me.lastTopic = topic;