summaryrefslogtreecommitdiff
path: root/backend
Side-by-side diff
Diffstat (limited to 'backend') (more/less context) (show whitespace changes)
-rw-r--r--backend/php/src/index.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/backend/php/src/index.php b/backend/php/src/index.php
index 3d23e7a..214ac01 100644
--- a/backend/php/src/index.php
+++ b/backend/php/src/index.php
@@ -354,55 +354,56 @@ error_log("oneTimePassword");
} else {
throw new Exception("The requested One Time Password was not active");
}
} else {
throw new Exception("The requested One Time Password has not been found");
}
//=============================================================
}
break;
case "message":
error_log("message");
if ($parameters["srpSharedSecret"] == $_SESSION["K"]) {
$message = $parameters["message"];
//=============================================================
if ($message == "getUserDetails") {
//{"message":"getUserDetails", "srpSharedSecret":"f18e5cf7c3a83b67d4db9444af813ee48c13daf4f8f6635397d593e52ba89a08", "parameters":{}}
$user = new user();
$user = $user->Get($_SESSION["userId"]);
$result["header"] = $user->header;
+
$records = $user->GetRecordList();
- foreach ($records as $record)
- {
+ foreach ($records as $record) {
$recordStats["updateDate"] = $record->update_date;
$recordsStats[$record->reference] = $recordStats;
}
$result["recordsStats"] = $recordsStats;
+
$result["statistics"] = $user->statistics;
$result["version"] = $user->version;
//=============================================================
} else if ($message == "addNewRecords") {
/*
//{
// "message":"addNewRecords",
// "srpSharedSecret":"b58fdf62acebbcb67f63d28c0437f166069f45690c648cd4376a792ae7a325f7",
// "parameters":{
// "records":[
// {
// "record":{
// "reference":"fda703707fee1fff42443124cd0e705f5bea0ac601758d81b2e832705339a610",
// "data":"OBSGtcb6blXq/xaYG.....4EqlQqgAvITN",
// "version":"0.3"
// },
// "currentRecordVersion":{
// "reference":"83ad301525c18f2afd72b6ac82c0a713382e1ef70ac69935ca7e2869dd4ff980",
// "recordReference":"fda703707fee1fff42443124cd0e705f5bea0ac601758d81b2e832705339a610",
// "data":"NXJ5jiZhkd0CMiwwntAq....1TjjF+SGfE=",
// "version":"0.3",
// "previousVersion":"3e174a86afc322271d8af28bc062b0f1bfd7344fad01212cd08b2757c4b199c4",
// "previousVersionKey":"kozaaGCzXWr71LbOKu6Z3nz520V..5U85tSBvb+u44twttv54Kw=="