Skip to content

Commit

Permalink
try without auto
Browse files Browse the repository at this point in the history
  • Loading branch information
thesam73 committed Aug 21, 2014
1 parent bc0166d commit 0725ea3
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
1 change: 0 additions & 1 deletion .meteor/packages
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
# but you can also edit it by hand.

standard-app-packages
autopublish
insecure
preserve-inputs
moment
Expand Down
17 changes: 16 additions & 1 deletion iou-meteor.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ function drawChartCurrent() {

if (Meteor.isClient) {
//Meteor.subscribe("Depenses");
Meteor.subscribe("depenses-recent");
Meteor.subscribe("Monthlydepenses");

Deps.autorun(function () {
Expand All @@ -137,8 +138,14 @@ if (Meteor.isClient) {
Session.set("resNameDebt", response);
});

//Template.depenses.created = function(){
// Meteor.subscribe('depenses-recent');
//};
//Template.depenses.helpers({
// 'depenses': function() {Depenses.find();}
//});
Template.depenses.depenses = function () {
return [];
return Depenses.find();
// return Depenses.findFaster({}, {
// sort: {
// timestamp: -1
Expand Down Expand Up @@ -449,7 +456,15 @@ if (Meteor.isClient) {
}

if (Meteor.isServer) {

Meteor.startup(function () {
//Monthlydepenses
Meteor.publish('Monthlydepenses', function () {
return Monthlydepenses.findFaster({}, {sort: {timestamp: -1}});
});
Meteor.publish('depenses-recent', function () {
return Depenses.findFaster({}, {sort: {timestamp: -1},limit: 50});
});
return Meteor.methods({
callAmountDebt: function() {
var samItems = Depenses.findFaster({
Expand Down

0 comments on commit 0725ea3

Please sign in to comment.