Created
March 29, 2019 17:38
-
-
Save ntakouris/c8b4bb886eb5869334854c94811ed232 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const ApiBaseUrl = process.env.API_URL | |
const BasePrefix = '/api' | |
const Base = ApiBaseUrl + BasePrefix + '/v1' | |
const NodesBase = Base + '/nodes' | |
const ApiRoutes = { | |
ApiBaseUrl: ApiBaseUrl, | |
Nodes: { | |
GetAll: NodesBase, | |
GetDetailsById: nodeId => NodesBase + '/' + nodeId, | |
ShutdownById: nodeId => NodesBase + '/' + nodeId + '/shutdown', | |
StartFirmwareUpdateById: nodeId => NodesBase + '/' + nodeId + '/firmwareupdate', | |
GetRegistersByNodeId: nodeId => NodesBase + '/' + nodeId + '/registers', | |
UpdateRegisterByNameAndNodeId: (nodeId, param) => NodesBase + '/' + nodeId + '/registers/' + param | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment