summaryrefslogtreecommitdiff
path: root/hi-ui/src/store/logins.js
blob: 207b75738c29c6b72822d559cd7d8bda4859dd68 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
export class Logins {
	constructor() {
		this.logins = {};
	}

	addLogin(id, name) {
		this.logins[id] = name;
		return this;
	}

	addLogins(logins) {
		for (let { id, name } of logins) {
			this.addLogin(id, name);
		}
		return this;
	}

	get(id) {
		return this.logins[id];
	}
}