mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-04-20 13:36:20 +00:00
Added modal window for server deletion
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import Storage from '../../utils/Storage';
|
||||
import { dissoc } from 'ramda';
|
||||
|
||||
const SERVERS_STORAGE_KEY = 'servers';
|
||||
|
||||
@@ -21,6 +22,11 @@ export class ServersService {
|
||||
servers[server.id] = server;
|
||||
this.storage.set(SERVERS_STORAGE_KEY, servers);
|
||||
};
|
||||
|
||||
deleteServer = server => {
|
||||
const servers = dissoc(server.id, this.listServers());
|
||||
this.storage.set(SERVERS_STORAGE_KEY, servers);
|
||||
};
|
||||
}
|
||||
|
||||
export default new ServersService(Storage);
|
||||
|
||||
Reference in New Issue
Block a user