less hacking way of pulling poe data

This commit is contained in:
2018-08-27 23:54:27 -05:00
parent 5423b81c95
commit 97acc0d4fa
34 changed files with 651 additions and 221 deletions

View File

@@ -0,0 +1,25 @@
import Store from 'electron-store';
const store = new Store();
const storeUsername = (username: string) => {
store.set('user', username);
};
const storeSessionID = (sessionID: string) => {
store.set('sessionID', sessionID);
};
const getSessionID = (): string | undefined => {
return store.get('sessionID') || undefined;
};
const getUsername = (): string | undefined => {
return store.get('user') || undefined;
};
export const StorageService = {
getUsername,
getSessionID,
storeUsername,
storeSessionID,
};