aboutsummaryrefslogtreecommitdiff
path: root/pyaggr3g470r
diff options
context:
space:
mode:
Diffstat (limited to 'pyaggr3g470r')
-rw-r--r--pyaggr3g470r/rest.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/pyaggr3g470r/rest.py b/pyaggr3g470r/rest.py
index 34530b02..8de9608e 100644
--- a/pyaggr3g470r/rest.py
+++ b/pyaggr3g470r/rest.py
@@ -33,6 +33,8 @@ from flask import g, Response, request, session, jsonify
from flask.ext.restful import Resource, reqparse
#from flask.ext.restful.inputs import boolean
+if not conf.ON_HEROKU:
+ import search as fastsearch
from pyaggr3g470r import api, db
from pyaggr3g470r.models import User, Article, Feed
@@ -195,6 +197,12 @@ class ArticleAPI(Resource):
if None is not args.get('readed', None):
article.readed = args['readed']
db.session.commit()
+
+ try:
+ fastsearch.delete_article(g.user.id, article.feed_id, article.id)
+ except:
+ pass
+
return {"message":"ok"}
else:
response = jsonify({'code': 404, 'message': 'Article not found'})
bgstack15