discern by archived_by
This commit is contained in:
parent
6661477599
commit
7cf7422b46
@ -34,7 +34,11 @@ def get_article_by_id(id):
|
|||||||
@app.route("/api/article/first")
|
@app.route("/api/article/first")
|
||||||
def get_article_first(min_id=0):
|
def get_article_first(min_id=0):
|
||||||
with db:
|
with db:
|
||||||
article = models.ArticleDownload.select(models.ArticleDownload.id).where((models.ArticleDownload.verified == 0) & (models.ArticleDownload.id > min_id)).order_by(models.ArticleDownload.id).first()
|
article = models.ArticleDownload.select(models.ArticleDownload.id).where(
|
||||||
|
(models.ArticleDownload.verified == 0) &
|
||||||
|
(models.ArticleDownload.id > min_id) &
|
||||||
|
(models.ArticleDownload.archived_by == os.getenv("UNAME"))
|
||||||
|
).order_by(models.ArticleDownload.id).first()
|
||||||
return {"id" : article.id}
|
return {"id" : article.id}
|
||||||
|
|
||||||
@app.route("/api/article/<int:id>/next")
|
@app.route("/api/article/<int:id>/next")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user