OSDN Git Service

js/newslash.js: add changeEmail()
authorhylom <hylom@users.sourceforge.jp>
Mon, 5 Nov 2018 11:27:12 +0000 (20:27 +0900)
committerhylom <hylom@users.sourceforge.jp>
Mon, 5 Nov 2018 11:27:12 +0000 (20:27 +0900)
src/newslash_web/public/js/newslash.js

index c41d145..cb97f79 100644 (file)
@@ -134,6 +134,13 @@ function _initNewslash() {
     return this.post(url, data);
   };
 
+  Newslash.prototype.changeEmail = function (newAddress) {
+    options = options || {};
+    var url = "/user";
+    var data = { type: "email", address: newAddress, };
+    return this.post("/user", data);
+  };
+
   Newslash.prototype.getMessageSettings = function getMessageSettings () {
     return this.get("/user?type=message_config");
   };