var api = {

  getUser(userId){
    var userId = userId;
    var url = `https://simulnos.herokuapp.com/api/users/${userId}`;
    console.log(url)
    return fetch(url).then((res) => res.json()).catch(error => {
    console.log(error);
    alert(error.message);
    });
  },
  getUserMessages(userId){
    var username = "Username".toLowerCase().trim();
    var userId = userId
    var url = `https://simulnos.herokuapp.com/api/users/${userId}/messages`;
    return fetch(url).then((res) => res.json()).catch(error => {
    console.log(error);
    alert(error.message);
    });
  },
  getStories(){
    var url = 'https://simulnos.herokuapp.com/api'
    return fetch(url).then((res) => res.json()).catch(error => {
    console.log(error);
    alert(error.message);
    });
  },
  getUserStories(userId){
    var userId = userId;
    var url = `https://simulnos.herokuapp.com/api/${userId}/stories`;
    return fetch(url).then((res) => res.json()).catch(error => {
    console.log(error);
    alert(error.message);
    });
  },
  createMessage(username, message){
    username = username.toLowerCase().trim();
    var url = `https://simulnos.herokuapp.com/api/${user.id}.json`;
    return fetch(url, {
      method: 'post',
      body: JSON.stringify({
        username: '',
        name: '',
        location: '',
        bio: '',
        resource_request: '',
        skills: '',
        seeking: '',
        preferred_contact
      })
    }).then((res) => res.json()).catch(error => {
    console.log(error);
    alert(error.message);
    });
  },
  getUsers() {
    var url = 'https://simulnos.herokuapp.com/api/users'
    return fetch(url).then((res) => res.json()).catch(error => {
    console.log(error);
    alert(error.message);
    });
  },
  getStory(){
    var user = {id: 5}
    var story = {id: 1}
    var url = `https://simulnos.herokuapp.com/api/users/5/stories/1`;
    console.log(url);
    return fetch(url).then((res) => res.json()).catch(error => {
    console.log(error);
    alert(error.message);
    });
  },
};


module.exports = api;

@@ -1534,32 +1534,431 @@
 );%0A    %7D);%0A  %7D,%0A
+  //NOTE: NOT tested%0A  createStory(user_id, title, content)%7B%0A    var url = %60https://simulnos.herokuapp.com/api/$%7Buser.id%7D.json%60;%0A    return fetch(url, %7B%0A      method: 'post',%0A      body: JSON.stringify(%7B%0A        user_id: user_id,%0A        title: title,%0A        content: content,%0A      %7D)%0A    %7D).then((res) =%3E res.json()).catch(error =%3E %7B%0A    console.log(error);%0A    alert(error.message);%0A    %7D);%0A  %7D%0A
   getUsers() %7B%0A 

Make createStory() api method