2017-08-18 21:30:16 +00:00
|
|
|
import { SERVER } from './actionsTypes';
|
|
|
|
|
2019-04-17 17:01:03 +00:00
|
|
|
export function selectServerRequest(server, version, fetchVersion = true) {
|
2017-08-18 21:30:16 +00:00
|
|
|
return {
|
2018-08-01 19:35:06 +00:00
|
|
|
type: SERVER.SELECT_REQUEST,
|
2019-04-17 17:01:03 +00:00
|
|
|
server,
|
|
|
|
version,
|
|
|
|
fetchVersion
|
2017-08-18 21:30:16 +00:00
|
|
|
};
|
|
|
|
}
|
2018-08-01 19:35:06 +00:00
|
|
|
|
2019-04-17 17:01:03 +00:00
|
|
|
export function selectServerSuccess(server, version) {
|
2018-08-01 19:35:06 +00:00
|
|
|
return {
|
|
|
|
type: SERVER.SELECT_SUCCESS,
|
2019-04-17 17:01:03 +00:00
|
|
|
server,
|
|
|
|
version
|
2018-08-01 19:35:06 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2019-06-17 13:57:07 +00:00
|
|
|
export function selectServerFailure() {
|
|
|
|
return {
|
|
|
|
type: SERVER.SELECT_FAILURE
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2019-09-03 19:27:57 +00:00
|
|
|
export function serverRequest(server, certificate = null) {
|
2017-09-01 19:42:50 +00:00
|
|
|
return {
|
|
|
|
type: SERVER.REQUEST,
|
2019-09-03 19:27:57 +00:00
|
|
|
server,
|
|
|
|
certificate
|
2017-09-01 19:42:50 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
export function serverSuccess() {
|
|
|
|
return {
|
|
|
|
type: SERVER.SUCCESS
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
export function serverFailure(err) {
|
|
|
|
return {
|
|
|
|
type: SERVER.FAILURE,
|
|
|
|
err
|
|
|
|
};
|
|
|
|
}
|
2018-08-31 18:13:30 +00:00
|
|
|
|
|
|
|
export function serverInitAdd() {
|
|
|
|
return {
|
|
|
|
type: SERVER.INIT_ADD
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
export function serverFinishAdd() {
|
|
|
|
return {
|
|
|
|
type: SERVER.FINISH_ADD
|
|
|
|
};
|
|
|
|
}
|