mirror of
https://github.com/lucaspalomodevelop/eventcally.git
synced 2026-03-13 08:09:37 +00:00
19 lines
576 B
Python
19 lines
576 B
Python
from flask_apispec import doc, marshal_with
|
|
|
|
from project.api import add_api_resource
|
|
from project.api.event_reference.schemas import EventReferenceSchema
|
|
from project.api.resources import BaseResource
|
|
from project.models import EventReference
|
|
|
|
|
|
class EventReferenceResource(BaseResource):
|
|
@doc(summary="Get event reference", tags=["Event References"])
|
|
@marshal_with(EventReferenceSchema)
|
|
def get(self, id):
|
|
return EventReference.query.get_or_404(id)
|
|
|
|
|
|
add_api_resource(
|
|
EventReferenceResource, "/event-references/<int:id>", "api_v1_event_reference"
|
|
)
|