]> git.wh0rd.org - tt-rss.git/commitdiff
Merge branch 'add_feed_id_to_subscribeToFeed_response' into 'master'
authorAndrew Dolgov <cthulhoo@gmail.com>
Mon, 29 Aug 2016 03:59:43 +0000 (06:59 +0300)
committerAndrew Dolgov <cthulhoo@gmail.com>
Mon, 29 Aug 2016 03:59:43 +0000 (06:59 +0300)
Add feed id to subscribe to feed response

As described on the forum, this proposed change is to make the subscribeToFeed API response include the feed_id of the new or existing feed.

https://tt-rss.org/forum/viewtopic.php?f=8&t=3893

Thank you.

John

See merge request !35

classes/api.php
include/functions.php

index 35c5d5f38e1b6ed734a92c5d6dfb5809ef26eaa9..da164aca1480ac1838f2fae8dea4a0da211a0c0c 100644 (file)
@@ -2,7 +2,7 @@
 
 class API extends Handler {
 
-       const API_LEVEL  = 13;
+       const API_LEVEL  = 14;
 
        const STATUS_OK  = 0;
        const STATUS_ERR = 1;
index 3902ac45a347aa2aa606a54811371b3bfc8fd6dc..3dea5677a9970515e22e546ca193e3f57737e169 100755 (executable)
                                set_basic_feed_info($feed_id);
                        }
 
-                       return array("code" => 1);
+                       return array("code" => 1, "feed_id" => (int) $feed_id);
                } else {
-                       return array("code" => 0);
+                       return array("code" => 0, "feed_id" => (int) db_fetch_result($result, 0, "id"));
                }
        }