university-final-iot-backend/app/api/schemas.py

8 lines
188 B
Python
Raw Normal View History

from marshmallow import Schema, post_dump
class BaseResourceSchema(Schema):
@post_dump(pass_many=True)
def wrap_with_envelope(self, data, many):
return {'content': data}