Update request node checkin in update node

This commit is contained in:
Logan Cusano
2023-07-21 18:36:21 -04:00
parent 11c8a149bb
commit abb833840a

View File

@@ -248,13 +248,13 @@ exports.updateExistingNode = async = (req, res) => {
if (!nodeInfo) {
log.WARN("No existing node found with this ID, adding node: ", checkInObject);
addNewNode(checkInObject, (newNode) => {
this.requestNodeCheckIn(checkInObject.id);
this.requestNodeCheckIn({"params": {"nodeId": checkInObject.id}});
return res.status(201).json({ "updatedKeys": newNode });
});
}
else {
updateNodeInfo(checkInObject, () => {
this.requestNodeCheckIn(checkInObject.id);
this.requestNodeCheckIn({"params": {"nodeId": checkInObject.id}});
return res.status(202).json({ "updatedKeys": checkInObject });
});
}