Skip to content
This repository was archived by the owner on Aug 18, 2025. It is now read-only.

Sample State

Alex L edited this page Mar 31, 2023 · 4 revisions

Sample of a state

{
    entities: {
        users: {
            1: {
                id: 1,
                username: "TheBieber"
            },
            2: {
                id: 2,
                username: "TheodoreBonkers"
            }
        },
        gigs: {
            1: {
                id: 1,
                sellerId: 1,
                title: "I will teach you how to sing well",
                description: "I've been in the professional music scene for years and would like to share my knowledge. With me you'll learn to sing like Pavarotti", 
                basePrice: "35$"
            },
            2: {
                id: 2,
                seller_id: 2,
                title: "I will teach you how to play Apex Legends like a god!",
                description: "Sign up for a lesson with me and you'll be able to get that Victory every game! Did you know the characters in the game run at different speeds?!",
                basePrice: "25$"
            }
        },
        likes: {
            1: {
                id: 1,
                gigId: 1,
                userId: 2
            },
            2: {
                id: 2,
                gigId: 2,
                userId: 1
            }
                
            
        },
        reviews: {
            1: {
                id: 1,
                gigId: 2,
                reviewerId: 45,
                body: "Highly recommend this seller! Had a great lesson with him, took me from bronze to plat in 3 games.",
                response_from_seller: "Thank you for the review! Had a great time playing with you!"
            }
        }
    },
    errors: {
        login: ["Incorrect username/password combination"],
        sessionErrors: ["Session has encountered an error"],
        reviewErrors: ["Please make sure the body of your review is filled out"]
    },
    session: { currentUserId: 25 }
}
```js

Clone this wiki locally