summaryrefslogtreecommitdiff
path: root/client/button.js
diff options
context:
space:
mode:
Diffstat (limited to 'client/button.js')
-rw-r--r--client/button.js25
1 files changed, 16 insertions, 9 deletions
diff --git a/client/button.js b/client/button.js
index 8dc64a5..bc3828b 100644
--- a/client/button.js
+++ b/client/button.js
@@ -1,13 +1,20 @@
-Session.setDefault('counter', 0);
+Template.layout.events({
+ 'click .logout': function (event) {
+ Meteor.logout();
+ Router.go('login');
+ }
+})
-Template.hello.helpers({
- counter: function () {
- return Session.get('counter');
+Template.login.events({
+ 'click .login-instagram': function (event) {
+ Meteor.loginWithInstagram({}, function (err) {
+ if (err)
+ Session.set('errorMessage', err.reason || 'Unknown error');
+ });
+ return false;
}
});
-Template.hello.events({
- 'click button': function () {
- Session.set('counter', Session.get('counter') + 1);
- }
-}); \ No newline at end of file
+Accounts.onLogin(function() {
+ Router.go('one');
+});