Skip to content

Commit

Permalink
Merge 550c65f into 0f33cb1
Browse files Browse the repository at this point in the history
  • Loading branch information
bartvanb committed Sep 19, 2022
2 parents 0f33cb1 + 550c65f commit 25f7d1c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions vantage6-server/vantage6/server/resource/node.py
Original file line number Diff line number Diff line change
Expand Up @@ -465,6 +465,9 @@ def patch(self, id):
name:
type: string
description: Node name
ip:
type: string
description: The node's VPN IP address
responses:
200:
Expand Down Expand Up @@ -538,5 +541,10 @@ def patch(self, id):
f'{node.collaboration.id} already exists!'}, \
HTTPStatus.BAD_REQUEST

# update node IP address if it is given
ip = data.get('ip')
if ip:
node.ip = ip

node.save()
return node_schema.dump(node).data, HTTPStatus.OK

0 comments on commit 25f7d1c

Please sign in to comment.