Skip to content

Commit

Permalink
feat(storage): get/set current user
Browse files Browse the repository at this point in the history
  • Loading branch information
trs committed Nov 23, 2017
1 parent c84eb42 commit ba8a3df
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/storage.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,22 @@ const conf = new ConfigStore(confName);
const storage = {
_path: conf.path,

getCurrentUser,
setCurrentUser,
getUsers,
getUser,
setUsers,
addUser,
removeUser
};

function getCurrentUser() {
return conf.get('current_user') || null;
}

function setCurrentUser(user) {
conf.set('current_user', user);
}

function setUsers(users) {
conf.set('users', users);
Expand Down

0 comments on commit ba8a3df

Please sign in to comment.