Skip to content

Commit

Permalink
Fix messages endpoint params (#754)
Browse files Browse the repository at this point in the history
  • Loading branch information
munrojm committed Jun 13, 2023
1 parent 68aba26 commit 8da9da4
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion emmet-api/emmet/api/routes/_messages/resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
MessagesPostQuery,
MessagesGetQuery,
)
from maggma.api.query_operator import PaginationQuery, SparseFieldsQuery
from emmet.core._messages import MessagesDoc


Expand All @@ -11,7 +12,13 @@ def messages_resource(messages_store):
messages_store,
MessagesDoc,
post_query_operators=[MessagesPostQuery()],
get_query_operators=[MessagesGetQuery()],
get_query_operators=[
MessagesGetQuery(),
PaginationQuery(),
SparseFieldsQuery(
model=MessagesDoc, default_fields=["title", "body", "last_updated"]
),
],
include_in_schema=False,
)

Expand Down

0 comments on commit 8da9da4

Please sign in to comment.