GSG-G11 / Fitness-house

a website that give the user the ability to search about Gyms suits him
https://fit-house.herokuapp.com/
4 stars 4 forks source link

[FrontEnd - BackEnd] Update API single gym and make update page dynamic #101

Closed AhmedQeshta closed 2 years ago

AhmedQeshta commented 2 years ago

[FrontEnd - BackEnd] Update API single gym and make update page dynamic

First Must you have token as cookies

token =

eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwiaWQiOiIxIiwibmFtZSI6ItmG2KfYr9mKINmB2LHZitmG2K_YsiDZhNmE2YrYp9mC2Kkg2KfZhNio2K_ZhtmK2KkiLCJyb2xlIjoiZ3ltIn0.GVUpW4d4ZR98HaZnQe9Rpb6Lix_wsQShXbXZq8zkdMg

To Be

{
    "gymData": {
        "id": ".....",
        "gymName": ".....",
        "logo": ".....",
        "city": ".....",
        "phone": ".....",
        "sixMonthPrice": ".....",
        "monthlyPrice": ".....",
        "fulltime": ".....",
        "typeGender": ".....",
        "description": ".....",
        "features": [
            ".....",
         "....."
        ],
        "review": ".....",
        "images": [
            {
                "pathUrl": "....."
            },
            {
                "pathUrl": "....."
            },
            {
                "pathUrl": "....."
            },
            {
                "pathUrl":"....."
            },
            {
                "pathUrl": "....."
            }
        ],
        "reviews": [
            {
                "id": ".....",
                "rate": ".....",
                "description": ".....",
                "createdAt": ".....",
                "userId": ".....",
                "user": {
                    "username":".....",
                    "avatar": "....."
                }
            }

        ]
    }
}

Get old data then display it image

display Loading component before display input image

Add Alert image

Loadin in when click update image