aboutsummaryrefslogtreecommitdiff
path: root/src/web/views/views.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/web/views/views.py')
-rw-r--r--src/web/views/views.py17
1 files changed, 0 insertions, 17 deletions
diff --git a/src/web/views/views.py b/src/web/views/views.py
index f543c6fa..4abea96e 100644
--- a/src/web/views/views.py
+++ b/src/web/views/views.py
@@ -416,20 +416,3 @@ def export_opml():
response.headers['Content-Type'] = 'application/xml'
response.headers['Content-Disposition'] = 'attachment; filename=feeds.opml'
return response
-
-
-@app.route('/expire_articles', methods=['GET'])
-@login_required
-def expire_articles():
- """
- Delete articles older than the given number of weeks.
- """
- weeks_ago = datetime.datetime.utcnow() - \
- datetime.timedelta(weeks=int(request.args.get('weeks', 10)))
- Article.query.filter(
- and_(Article.user_id == g.user.id,
- or_(Article.date < weeks_ago,
- Article.retrieved_date < weeks_ago))).delete()
- flash(gettext('Articles deleted.'), 'info')
- db.session.commit()
- return redirect(redirect_url())
bgstack15