mjayjones13 / beans

0 stars 0 forks source link

Function - retrieve a User by ID #32

Open joshcox opened 7 years ago

joshcox commented 7 years ago

Retrieve a User from the Beans CRUD route. Function should take an ID and return a User object.

Load the file in at the top of the script tags in beans.html.

Use the Fetch library (which uses Promises, so we'll need a polyfill for Promises).

// util/data/user.js
var Beans = {
    data: {
        user: {
            getUser(id) {}
        }
    }
};