[Kimchi-devel] [PATCH] [Wok 1/3] Implement notifications JS API

Lucio Correia luciojhc at linux.vnet.ibm.com
Mon Apr 4 19:24:34 UTC 2016


Signed-off-by: Lucio Correia <luciojhc at linux.vnet.ibm.com>
---
 ui/js/src/wok.api.js | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/ui/js/src/wok.api.js b/ui/js/src/wok.api.js
index 24ea495..56e90ed 100644
--- a/ui/js/src/wok.api.js
+++ b/ui/js/src/wok.api.js
@@ -59,6 +59,24 @@ var wok = {
         });
     },
 
+    getNotifications: function (suc, err) {
+        wok.requestJSON({
+            url: 'notifications',
+            type : 'GET',
+            dataType : 'json',
+            success : suc,
+            error: err
+        });
+    },
+
+    removeNotification: function (id) {
+        wok.requestJSON({
+            url: 'notifications/' + id,
+            type : 'DELETE',
+            dataType : 'json',
+        });
+    },
+
     login : function(settings, suc, err) {
         $.ajax({
             url : "login",
-- 
1.9.1




More information about the Kimchi-devel mailing list