True back end - notifications
This commit is contained in:
@@ -73,7 +73,7 @@ wrenchboard=> SELECT uid,icon,msg,added FROM members_notification WHERE member_i
|
||||
logfmt(logINFO, "/WrenchReturnMemberNotifications()");
|
||||
return ret;
|
||||
|
||||
return 0;
|
||||
return ret;
|
||||
}
|
||||
|
||||
long WrenchReturnMemberBankAccount(CVars in, CVars &out) {
|
||||
|
||||
@@ -77,8 +77,9 @@ class WrenchNotifications extends BaseController
|
||||
|
||||
switch ($endpoint){
|
||||
case 'mynotifications':
|
||||
$call_backend = false;
|
||||
$local_out = $this->dummyData();
|
||||
$call_backend = true;
|
||||
// $local_out = $this->dummyData();
|
||||
$in["action"]=WRENCHBOARD_ACCT_NOTIFICATIONS;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -119,6 +119,27 @@ class ResultFormatter extends Model
|
||||
|
||||
// id AS coupon_id, ca.code, ca.amount, ca.added::date,ca.status
|
||||
switch ($in["action"]) {
|
||||
|
||||
case WRENCHBOARD_ACCT_NOTIFICATIONS:
|
||||
$total = $out["total_record"];
|
||||
$res = array(
|
||||
"status" => $out["status"],
|
||||
"total_record" => ($total - 1),
|
||||
"internal_return" => $out["internal_return"],
|
||||
"result_list" => array(),
|
||||
);
|
||||
for ($i = 0; $i < $total; $i++) {
|
||||
$key = sprintf("%05d", $i);
|
||||
$res["result_list"][] = array(
|
||||
"msg" => $out["msg_${key}"],
|
||||
"uid" => $out["uid_${key}"],
|
||||
"icon" => $out["icon_${key}"],
|
||||
"added" => $out["added_${key}"],
|
||||
|
||||
);
|
||||
}
|
||||
break;
|
||||
|
||||
case WRENCHBOARD_ACCOUNT_RECENTS:
|
||||
$total = $out["total_record"];
|
||||
$res = array(
|
||||
|
||||
Reference in New Issue
Block a user