-
Notifications
You must be signed in to change notification settings - Fork 0
Sample State
Matt Ha edited this page Jan 30, 2018
·
6 revisions
{
entities: {
photos: {
1: {
id: 1,
photo_url: "server/photo/1234.jpg"
description: "tbt to the beach",
author_id: 7,
liked_id: [5, 25],
current_user_likes: false
},
2: {
id: 2,
photo_url: "server/photo/124213.jpg"
description: "Wishing I was back in Prague <3",
author_id: 5,
likes: 124,
liked_id: [5, 7],
current_user_likes: false
},
},
comments: {
2: {
id: 2,
body: "omg miss this",
author_id: 5,
photo_id: 2,
}
77: {
id: 77,
body: "are you talking to yourself",
author_id: 25,
photo_id: 2,
},
50: {
id: 50,
body: "lol a little bit",
author_id: 5,
photo_id: 2,
}
}
users: {
7: {
id: 7,
username: "matt",
img_url: "http://source.matt-prof-pic.jpg"
following_ids: [5, 25]
followed_by_ids: [5]
saved_post_ids: []
current_user_follows: false
}
5: {
id: 5,
username: "matt.ha.1993",
img_url: "http://source.other-matt-prof-pic.jpg"
following_ids: [7, 25]
followed_by_ids: [7, 25]
saved_post_ids: [2]
current_user_follows: false
},
25: {
id: 25,
username: "matthias",
img_url: "http://source.matthias-prof-pic.jpg"
following_ids: [7]
followed_by_ids: [5]
saved_post_ids: [1, 2]
current_user_follows: true
}
}
},
errors: {
general: ["Hmm, something went wrong. We're looking into it!"]
login: ["Incorrect username/password combination"],
photoForm: ["Description body cannot be blank"],
commentForm: ["Comment body cannot be blank"],
},
session: {
id: 24537,
username: "matt",
}
}