Commit f9d26fa4 authored by Mathieu Rodic's avatar Mathieu Rodic

[FEATURE] Taking the current user into account in `GET /nodes`

parent 038ff52f
...@@ -509,6 +509,7 @@ class NodesList(APIView): ...@@ -509,6 +509,7 @@ class NodesList(APIView):
def get(self, request): def get(self, request):
query = (Node query = (Node
.query(Node.id, Node.name, NodeType.name.label('type')) .query(Node.id, Node.name, NodeType.name.label('type'))
.filter(Node.user_id == request.session._session_cache['_auth_user_id'])
.join(NodeType) .join(NodeType)
) )
if 'type' in request.GET: if 'type' in request.GET:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment