mirror of
https://github.com/GSA/notifications-api.git
synced 2026-09-05 13:48:25 -04:00
Work in progress, skeleton of the api created and testing started. Need to fix authentication tests.
This commit is contained in:
20
app/schemas.py
Normal file
20
app/schemas.py
Normal file
@@ -0,0 +1,20 @@
|
||||
from marshmallow_sqlalchemy import ModelSchema
|
||||
from . import models
|
||||
|
||||
|
||||
class UserSchema(ModelSchema):
|
||||
class Meta:
|
||||
model = models.User
|
||||
|
||||
|
||||
# TODO process users list, to return a list of user.id
|
||||
# Should that list be restricted??
|
||||
class ServiceSchema(ModelSchema):
|
||||
class Meta:
|
||||
model = models.Service
|
||||
|
||||
|
||||
user_schema = ServiceSchema()
|
||||
users_schema = UserSchema(many=True)
|
||||
service_schema = ServiceSchema()
|
||||
services_schema = ServiceSchema(many=True)
|
||||
Reference in New Issue
Block a user