-
Notifications
You must be signed in to change notification settings - Fork 0
Sample State
Christopher Lee edited this page Dec 21, 2017
·
4 revisions
{
entities: {
posts: {
1: {
id: 1,
image: image_url,
author_id: 8,
caption: 'this is a picture',
likes: 100,
comments: ['comment1', 'comment2', 'comment3'],
gallery_id: 3,
tags: ['tag1', 'tag2', 'tag3']
},
2: {
id: 2,
image: image_url,
author_id: 8,
caption: 'this is a picture',
likes: 50,
comments: ['comment1', 'comment2', 'comment3'],
gallery_id: 4,
tags: ['tag1', 'tag2', 'tag3']
}
3: {
id: 3,
image: image_url,
author_id: 10,
caption: 'this is a picture',
likes: 200,
comments: ['comment1', 'comment2', 'comment3'],
gallery_id: 5,
tags: ['tag1', 'tag2', 'tag3']
}
},
comments: {
1: {
id: 1,
author_id: 8
post: 3,
body: "I like this picture."
}
2: {
id: 2,
author_id: 10
post: 1,
body: "Wow look at this picture!"
}
3: {
id: 3,
author_id: 10
post: 2,
body: "This picture is ok."
}
},
galleries: {
1: {
id: 1,
user: 8,
photos: [1, 2]
},
2: {
id: 2,
user: 10,
photos: [3]
}
},
users: {
8: {
id: 8,
username: 'Batman',
description: "I'm Batman",
about: "Batman has many sidekicks such as Robin, Batgirl, and Nightwing."
profile_url: 'www.aperture.com/batman',
photos: [1, 2],
galleries: [1],
followers: 500,
following: [10, 12],
affection: 9000,
photo_views: 100000
},
10: {
id: 10,
username: 'Superman',
description: "I'm Superman",
about: "I'm the Man of Steel."
profile_url: 'www.aperture.com/superman',
photos: [3],
galleries: [2],
followers: 500,
following: [8, 12],
affection: 9000,
photo_views: 100000
},
12: {
id: 10,
username: 'Wonderwoman',
description: "Where's Steve?!",
about: "I'm an Amazonian Princess"
profile_url: 'www.aperture.com/wonderwoman',
photos: [],
galleries: [],
followers: 500,
following: [8, 10],
affection: 9000,
photo_views: 100000
},
},
},
ui: {
loading: true/false
},
session: {
id: 101,
username: "Batman",
profile_url: 'www.aperture.com/batman'
}
errors: {
sign_up: ["Username/Password does not satisfy requirements."],
log_in: ["Incorrect Username/Password combination."]
}
}