aboutsummaryrefslogtreecommitdiff
path: root/pyaggr3g470r/static/js/articles.js
diff options
context:
space:
mode:
authorFrançois Schmidts <francois.schmidts@gmail.com>2015-03-01 14:08:02 +0100
committerFrançois Schmidts <francois.schmidts@gmail.com>2015-03-03 22:23:47 +0100
commita4fb151ea53d8054cc8e3fb309395c8fa0e23aaf (patch)
tree6ce8c39978c83d22d2508da67f00c90232819855 /pyaggr3g470r/static/js/articles.js
parentnew crawler with cache control and error handling (diff)
downloadnewspipe-a4fb151ea53d8054cc8e3fb309395c8fa0e23aaf.tar.gz
newspipe-a4fb151ea53d8054cc8e3fb309395c8fa0e23aaf.tar.bz2
newspipe-a4fb151ea53d8054cc8e3fb309395c8fa0e23aaf.zip
fixing/restoring logging level
Diffstat (limited to 'pyaggr3g470r/static/js/articles.js')
-rw-r--r--pyaggr3g470r/static/js/articles.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/pyaggr3g470r/static/js/articles.js b/pyaggr3g470r/static/js/articles.js
index 51273f3d..312a5cb6 100644
--- a/pyaggr3g470r/static/js/articles.js
+++ b/pyaggr3g470r/static/js/articles.js
@@ -18,6 +18,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+API_ROOT = 'api/v2.0/'
+
if (typeof jQuery === 'undefined') { throw new Error('Requires jQuery') }
+function ($) {
@@ -78,7 +80,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Requires jQuery') }
// Encode your data as JSON.
data: data,
// This is the type of data you're expecting back from the server.
- url: "/api/v1.0/articles/"+article_id,
+ url: API_ROOT + "article/" + article_id,
success: function (result) {
//console.log(result);
},
@@ -114,7 +116,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Requires jQuery') }
// Encode your data as JSON.
data: data,
// This is the type of data you're expecting back from the server.
- url: "/api/v1.0/articles/"+article_id,
+ url: API_ROOT + "article/" + article_id,
success: function (result) {
//console.log(result);
},
@@ -132,7 +134,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Requires jQuery') }
// sends the updates to the server
$.ajax({
type: 'DELETE',
- url: "/api/v1.0/articles/"+article_id,
+ url: API_ROOT + "article/" + article_id,
success: function (result) {
//console.log(result);
},
bgstack15