Added hability to create servers

This commit is contained in:
Alejandro Celaya
2018-07-16 18:48:50 +02:00
parent be30d62f6f
commit 22406d1253
3 changed files with 18 additions and 13 deletions

View File

@@ -1,6 +1,4 @@
import Storage from '../../utils/Storage';
import { assoc } from 'ramda';
import { v4 as uuid } from 'uuid';
const SERVERS_STORAGE_KEY = 'servers';
@@ -20,7 +18,6 @@ export class ServersService {
createServer = server => {
const servers = this.listServers();
server = assoc('id', uuid(), server);
servers[server.id] = server;
this.storage.set(SERVERS_STORAGE_KEY, servers);
};