mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-07-25 13:11:52 +00:00
Added modal window for server deletion
This commit is contained in:
@@ -2,10 +2,12 @@ import ServersService from '../services';
|
||||
|
||||
const FETCH_SERVERS = 'shlink/servers/FETCH_SERVERS';
|
||||
const CREATE_SERVER = 'shlink/servers/CREATE_SERVER';
|
||||
const DELETE_SERVER = 'shlink/servers/DELETE_SERVER';
|
||||
|
||||
export default function reducer(state = {}, action) {
|
||||
switch (action.type) {
|
||||
case FETCH_SERVERS:
|
||||
case DELETE_SERVER:
|
||||
return action.servers;
|
||||
case CREATE_SERVER:
|
||||
const server = action.server;
|
||||
@@ -26,3 +28,8 @@ export const createServer = server => {
|
||||
ServersService.createServer(server);
|
||||
return listServers();
|
||||
};
|
||||
|
||||
export const deleteServer = server => {
|
||||
ServersService.deleteServer(server);
|
||||
return listServers();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user