addMemo.js 277 B

123456789
  1. //Require paramter: memo (JSON string)
  2. newDBTableIfNotExists("Memo");
  3. var succ = writeDBItem("Memo",USERNAME + "/" + Date.now(),memo);
  4. if (succ == false){
  5. sendJSONResp(JSON.stringify({"error":"Write to database failed"}));
  6. }else{
  7. sendJSONResp(JSON.stringify("OK"));
  8. }