Commit bc81c01b authored by Clement Ho's avatar Clement Ho

[skip ci] update service to match backend

parent 1bba291d
......@@ -27,7 +27,9 @@ export default class SidebarAssigneesStore {
}
addCurrentUser() {
this.addUser(this.currentUserId);
this.addUser({
id: this.currentUserId,
});
this.saveUsers();
}
......@@ -45,14 +47,18 @@ export default class SidebarAssigneesStore {
this.service.update(payload)
.then((response) => {
const data = response.data;
const assignee = data.assignee;
const assignees = data.assignees;
this.users = [];
// TODO: Update this to match backend response
if (assignee) {
this.addUser(assignee.id, assignee.name, assignee.username, assignee.avatar_url, true);
}
assignees.forEach(function(a) {
this.addUser({
id: a.id,
name: a.name,
username: a.username,
avatarUrl: a.avatar_url,
}, true)
}.bind(this));
this.saved = true;
this.loading = false;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment