Created
March 28, 2016 01:38
-
-
Save dai-shi/67ed0af79701245c8563 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/imports/ui/App.jsx b/imports/ui/App.jsx | |
| index 1d0bbef..7694eb8 100644 | |
| --- a/imports/ui/App.jsx | |
| +++ b/imports/ui/App.jsx | |
| @@ -1,5 +1,6 @@ | |
| import React, { Component, PropTypes } from 'react'; | |
| import ReactDOM from 'react-dom'; | |
| +import { Meteor } from 'meteor/meteor'; | |
| import { createContainer } from 'meteor/react-meteor-data'; | |
| import { Tasks } from '../api/tasks.js'; | |
| @@ -26,6 +27,8 @@ class App extends Component { | |
| Tasks.insert({ | |
| text, | |
| createdAt: new Date(), // current time | |
| + owner: Meteor.userId(), // _id of logged in user | |
| + username: Meteor.user().username, // username of logged in user | |
| }); | |
| // Clear form |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment