Skip to content

Main (flask) backend app does not return likes number in response to GET /api/products #3

@agryaznov

Description

@agryaznov

I think there is an issue with the Main (flask) app, regarding what /api/products index returns (see this line of code). The response does not contain likes field.

Consequently, Main.tsx just won't show number of likes for a Product (since it won't be present in the fetch response, see this line).

It could work as shown in your (really awesome! 👍 ) youtube video only if you changed the destination port there in fetch call to 8000, hence requesting product list from the Admin django app instead. But since this breaks the 'admin vs main' separation logic, I assume it's really the Main flask backend app that should be fixed here (as Main.tsx still should communicate with the Main backend, not Admin backend).

Hence reporting this one here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions