-
Notifications
You must be signed in to change notification settings - Fork 0
Sample State
Chris Vo edited this page Jan 6, 2020
·
5 revisions
{
entities: {
users: {
10: {
id: 10,
username: "CurrySoup",
status: "Online",
serverIds: [1, 3],
directMessages: [],
friendIds: [11]
},
11: {
id: 11,
username: "NiceSoup",
status: "Away",
serverIds: [1, 2, 3],
friendIds: [10, 12]
},
12: {
id: 12,
username: "SoupPurrMan",
status: "Do Not Disturb",
serverIds: [1]
friendIds: [10]
},
13: {
id: 13,
username: "I Like Soup",
status: "Offline",
serverIds: [],
friendIds: []
}
},
servers: {
1: {
id: 1,
name: "Gaming with Friends",
userIds: [10, 11, 12],
ownerId: 10
},
2: {
id: 2,
name: "Chris's Server",
userIds: [11],
ownerId: 11
},
3: {
id: 3,
name: "School and Stuff",
userIds: [10, 11],
ownerId: 10
},
4: {
id: 4,
name: "DM between CurrySoup & NiceSoup",
userIds: [10, 11],
ownerId: null
}
},
messages: {
1200: {
id: 1200,
body: "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
authorId: 10
},
1201: {
id: 1201,
body: "@here Do you guys want to play some Overwatch?",
authorId: 12
},
1202: {
id: 1202,
body: "I'm down after I finish my homework!",
authorId: 11
},
1203: {
id: 1203,
body: "Dude, how did you do #3 on today's homework?",
authorId: 11
},
1204: {
id: 7,
body: "So I applied this specific formula to get another equation...",
authorId: 10
}
},
channels: {
30: {
id: 30,
name: "General",
type: "Text",
serverId: 1,
messageIds: [1200, 1201, 1202]
},
31: {
id: 31,
name: "Game",
type: "Voice",
serverId: 1,
messageIds: null
},
30: {
id: 32,
name: "Study and Chill",
type: "Voice",
serverId: 3,
messageIds: null
},
33: {
id: 33,
name: "Hello World!",
type: "Text",
server_id: 2,
messageIds: []
},
},
directMessages: {
120: {
id: 120,
messageIds: [1203, 1204]
serverId: 4
}
}
},
session: {
currentUserId: 10
},
errors: {
signup: ["Username has already been taken", "Email has already been used", "Password length is too short (minimum 6)"],
login: ["Incorrect Email and/or Password"],
serverForm: ["Server name is required"],
channelForm: ["Channel name is required"]
},
ui: {
loading: true/false
}
}