Изменение полей коллекции devices.
This commit is contained in:
parent
9b6bf7ea1e
commit
88cd019a4c
|
|
@ -2,7 +2,7 @@ Session.set("session_devices_type", "iPhone/iPod");
|
|||
|
||||
// ----------
|
||||
Template.devices_list.device = function () {
|
||||
return Devices.find({os_type : Session.get("session_devices_type")}, {sort: {checkin_date: -1}});
|
||||
return Devices.find({device_type : Session.get("session_devices_type")}, {sort: {checkin_date: -1}});
|
||||
};
|
||||
|
||||
Template.devices_list.get_name_by_id = function () {
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
<tr>
|
||||
<td>
|
||||
<div>
|
||||
<b>{{type}}</b>
|
||||
<b>{{name}}</b>
|
||||
</div>
|
||||
<div>
|
||||
{{os_type}} {{os_version}} {{screen_width}}x{{screen_height}}
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ Meteor.startup(function () {
|
|||
if (!device)
|
||||
return "Can't find such device-ID";
|
||||
|
||||
console.log("-------- Устройство: ", device.type);
|
||||
console.log("-------- Устройство: ", device.name);
|
||||
|
||||
var checkinDate = GetCurrentDateAndTime ();
|
||||
Devices.update(device._id, {$set: {checkin_date: checkinDate, owner_id: user._id}});
|
||||
|
|
|
|||
Loading…
Reference in New Issue