From 23cc052ea78f0c122f23096e0d0f0aa126389cff Mon Sep 17 00:00:00 2001
From: Dan Jones <dan.jones@noc.ac.uk>
Date: Wed, 16 Nov 2022 16:52:12 +0000
Subject: [PATCH] fix: correct endpoint imports

---
 endpoints/clients.py | 2 +-
 endpoints/notify.py  | 4 ++--
 endpoints/receive.py | 2 +-
 endpoints/send.py    | 4 ++--
 4 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/endpoints/clients.py b/endpoints/clients.py
index f1a4419..cc4018b 100644
--- a/endpoints/clients.py
+++ b/endpoints/clients.py
@@ -98,9 +98,9 @@ clients_file = ClientsFile()
 
 # Client
 class Client(Resource):
-    @marshal_with(resource_fields)
     def get(self, client_id):
         client = clients_file.find(client_id)
+        del client['secret']
         if not client:
             abort(404, message="No client with id: {}".format(client_id))
         return client
diff --git a/endpoints/notify.py b/endpoints/notify.py
index 8c68385..96c54e3 100644
--- a/endpoints/notify.py
+++ b/endpoints/notify.py
@@ -1,5 +1,5 @@
-from flask_restful import Resource, reqparse, abort, fields, marshal_with
-from marshmallow import Schema, field
+from flask_restful import Resource, reqparse, abort
+from marshmallow import Schema, fields
 import json
 
 class NotifySchema(Schema):
diff --git a/endpoints/receive.py b/endpoints/receive.py
index 6567b0d..2f86d7a 100644
--- a/endpoints/receive.py
+++ b/endpoints/receive.py
@@ -1,4 +1,4 @@
-from flask_restful import Resource, request, abort, fields
+from flask_restful import Resource, request, abort
 from marshmallow import Schema, fields
 import pika
 import json
diff --git a/endpoints/send.py b/endpoints/send.py
index 31e38d9..8cbfda1 100644
--- a/endpoints/send.py
+++ b/endpoints/send.py
@@ -1,5 +1,5 @@
-from flask_restful import Resource, reqparse, abort, fields, marshal_with
-from marshmallow import Schema, field
+from flask_restful import Resource, reqparse, abort
+from marshmallow import Schema, fields
 import json
 
 class SendSchema(Schema):
-- 
GitLab