State Shape - Neminem1203/Me-Cube GitHub Wiki

State Shape

{
	entities: {
		comments: {
			1: {
				id: 1,
				comment: "first",
				commenter_id: 2,
				commentable_type: "Video",
				commenter_id: 1,
			},
			2: {
				comment: "i regret making this site",
				commenterId: 1,
				commentable_type: "Comment",
				commenter_id: 1,
			},
			3: {
				comment: "second",
				commenterId: 3,
				commentable_type: "Comment",
				commenter_id: 1,
			},
			4: {
				comment: "hunter2 you in the hunter2",
				commenterId: 3,
				commentable_type: "Video",
				commenter_id: 2,
			}
		},
		users: {
			1: {
				id: 1,
				username: "admin",
				email: "[email protected]",
				videos: [1, 3],
			},
			2: {
				id: 2,
				username: "new_user",
				email: "[email protected]",
				videos: [2],
			},
			3: {
				id: 3,
				username: "hunter2",
				email: "[email protected]",
				videos: [],
			}
		},
		videos: {
			1: {
				id: 1,
				title: "testing videos on the site",
				videoURL: "https://www.idonthaveafakevideo.com/whatever.mp4",
				description: "Testing out my new site",
				creator_id: 1,
				created_at: "17 Feb 2020",
				creator_username: "admin",
				views: "9.1M",
				thumbnail: "/thumbnail-1.png"
			},
			2: {
				id: 2,
				title: "FIRST VIDEO HAHAHAHA",
				videoURL: "https://www.stupidpieceof.com/first.mp4",
				description: "HAHAHAHA i made the first video before an admin could",
				creator_id: 2,
				created_at: "17 Feb 2020",
				creator_username: "new_user",
				views: "9.1M",
				thumbnail: "/thumbnail-2.png"
			},
			3: {
				id: 3,
				title: "Testing Video Upload",
				videoURL: "https://www.idonthaveafakevideo.com/anothervideo.mp4",
				description: "Testing out functionalities of this site.",
				creator_id: 1,
				created_at: "18 Feb 2020",
				creator_username: "admin",
				views: "9.1M",
				thumbnail: "/thumbnail-1.png"
			}
		}
	},
	ui: {
		modal: ["", "Sign Up", "Login", "ACCOUNT_DETAILS], #these are the possible combinations of what modal is showing#
		sidebar: true
	},
	error: {
		user: "Incorrect username/password combination",
		video: "Error occured during upload",
	},
	session: { 
		userId: 1 
	}
}