addStory returns instance of Story

main
anela 2 years ago
parent 40f5f1b48a
commit 813ead675a

@ -96,18 +96,19 @@ class StoryList {
);
console.log("the response is : ", response);
this.storyId = storyId;
this.title = title;
this.author = author;
this.url = url;
this.username = username;
this.createdAt = createdAt;
let returnObj = {
${response.data.}
};
return response;
// this.storyId = storyId;
// this.title = title;
// this.author = author;
// this.url = url;
// this.username = username;
// this.createdAt = createdAt;
// let returnObj = {
// ${response.data.}
// };
return new Story(response.data.story);
}
}

Loading…
Cancel
Save