Created
March 28, 2016 06:28
-
-
Save dai-shi/4191cfeb9278417b4419 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 bbbb728..4f41c39 100644 | |
| --- a/imports/ui/App.jsx | |
| +++ b/imports/ui/App.jsx | |
| @@ -24,12 +24,7 @@ class App extends Component { | |
| // Find the text field via the React ref | |
| const text = ReactDOM.findDOMNode(this.refs.textInput).value.trim(); | |
| - 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 | |
| - }); | |
| + Meteor.call('tasks.insert', text); | |
| // Clear form | |
| ReactDOM.findDOMNode(this.refs.textInput).value = ''; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment