vn-verdnaturachat/app/actions/server.js

57 lines
813 B
JavaScript
Raw Normal View History

import { SERVER } from './actionsTypes';
2019-04-17 17:01:03 +00:00
export function selectServerRequest(server, version, fetchVersion = true) {
return {
type: SERVER.SELECT_REQUEST,
2019-04-17 17:01:03 +00:00
server,
version,
fetchVersion
};
}
2019-04-17 17:01:03 +00:00
export function selectServerSuccess(server, version) {
return {
type: SERVER.SELECT_SUCCESS,
2019-04-17 17:01:03 +00:00
server,
version
};
}
export function selectServerFailure() {
return {
type: SERVER.SELECT_FAILURE
};
}
export function serverRequest(server) {
return {
type: SERVER.REQUEST,
server
};
}
export function serverSuccess() {
return {
type: SERVER.SUCCESS
};
}
export function serverFailure(err) {
return {
type: SERVER.FAILURE,
err
};
}
export function serverInitAdd() {
return {
type: SERVER.INIT_ADD
};
}
export function serverFinishAdd() {
return {
type: SERVER.FINISH_ADD
};
}