Last active
December 28, 2015 21:09
-
-
Save mrvdb/7562759 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/mediagoblin/plugins/api/views.py b/mediagoblin/plugins/api/views.py | |
index 69fae7b..e239f7e 100644 | |
--- a/mediagoblin/plugins/api/views.py | |
+++ b/mediagoblin/plugins/api/views.py | |
@@ -111,6 +111,11 @@ def get_entries(request): | |
# TODO: Make it possible to fetch unprocessed media, or media in-processing | |
entries = entries.filter_by(state=u'processed') | |
+ # allow getting one entry | |
+ m_id = int(request.GET.get('id') or 0) | |
+ if m_id: | |
+ entries = entries.filter_by(id=m_id) | |
+ | |
# TODO: Add sort order customization | |
entries = entries.order_by(request.db.MediaEntry.created.desc()) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment