Make node filename parsing more explicit and add stronger typing.
This commit is contained in:
parent
779c072ac7
commit
d2ca8ed55b
2 changed files with 26 additions and 21 deletions
server/services
|
@ -176,7 +176,6 @@ async function storeNodeInformation(nodeData: ParsedNode, node: StoredNode): Pro
|
|||
|
||||
const isValidMac = forConstraint(CONSTRAINTS.node.mac, false);
|
||||
|
||||
// TODO: Use sparkson for JSON parsing.
|
||||
export function parseNode(importTimestamp: UnixTimestampSeconds, nodeData: any): ParsedNode {
|
||||
if (!_.isPlainObject(nodeData)) {
|
||||
throw new Error(
|
||||
|
@ -249,7 +248,6 @@ export function parseNode(importTimestamp: UnixTimestampSeconds, nodeData: any):
|
|||
};
|
||||
}
|
||||
|
||||
// TODO: Use sparkson for JSON parsing.
|
||||
export function parseNodesJson(body: string): NodesParsingResult {
|
||||
Logger.tag('monitoring', 'information-retrieval').debug('Parsing nodes.json...');
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue