This commit is contained in:
parent
fcbd0e9426
commit
15909a46b3
@ -10,4 +10,3 @@ xeger
|
|||||||
pika
|
pika
|
||||||
psycopg2-binary
|
psycopg2-binary
|
||||||
marshmallow
|
marshmallow
|
||||||
flask-serialize
|
|
@ -28,8 +28,6 @@ class SampleResource(Resource):
|
|||||||
Sample endpoint
|
Sample endpoint
|
||||||
See: https://swagger.kmlabz.com/?urls.primaryName=Input%20Service
|
See: https://swagger.kmlabz.com/?urls.primaryName=Input%20Service
|
||||||
"""
|
"""
|
||||||
samplemetadatas_schema = SampleMetadata(many=True,
|
|
||||||
exclude=['id', 'device_id', 'device_date', 'tag', 'timestamp'])
|
|
||||||
|
|
||||||
def post(self):
|
def post(self):
|
||||||
"""
|
"""
|
||||||
@ -107,8 +105,6 @@ class SampleParameterResource(Resource):
|
|||||||
Sample endpoint with parameters
|
Sample endpoint with parameters
|
||||||
"""
|
"""
|
||||||
|
|
||||||
samplemetadata_schema = SampleMetadata(many=False)
|
|
||||||
|
|
||||||
def get(self, tag: str):
|
def get(self, tag: str):
|
||||||
"""
|
"""
|
||||||
Get a specific item
|
Get a specific item
|
||||||
@ -116,4 +112,4 @@ class SampleParameterResource(Resource):
|
|||||||
:return:
|
:return:
|
||||||
"""
|
"""
|
||||||
sample = SampleMetadata.query.filter_by(tag=tag).first_or_404()
|
sample = SampleMetadata.query.filter_by(tag=tag).first_or_404()
|
||||||
return self.samplemetadata_schema.dump(sample), 200
|
return sample, 200
|
||||||
|
Loading…
Reference in New Issue
Block a user