Skip to content

Instantly share code, notes, and snippets.

@tommarmstrong
Created January 3, 2016 03:29
Show Gist options
  • Save tommarmstrong/9ba7ba17112d3ec0e102 to your computer and use it in GitHub Desktop.
Save tommarmstrong/9ba7ba17112d3ec0e102 to your computer and use it in GitHub Desktop.
import db from '../database';
class Item {
static fetch(user_id) {
db.query("select * from items where user_id = $1", user_id)
.then(function (result) {
console.log(result);
})
.catch(function (error) {
console.log(error)
});
}
}
export default Item;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment