Cubeseed / Backend

3 stars 8 forks source link

farmer: edit / get single user profile endpoint #42

Open abu-hasib opened 1 year ago

abu-hasib commented 1 year ago
Screen Shot 2023-08-08 at 9 14 33 PM
abu-hasib commented 1 year ago

@sgarciahelguera @mihrab34

abu-hasib commented 1 year ago

I'm planning to work on this page. I need those endpoints to make the page dynamic. Has anyone work on it?

sgarciahelguera commented 1 year ago

There is something in place for the user profile, it is not refined at all, e.g. location is a string (or a few strings), and maybe it should be something more structured to be able to integrate the UI with a map? There is work in progress for the farm profile I don't know much about farm cluster yet, there is nothing in the backend for that Same goes for reviews and past activity

mihrab34 commented 1 year ago

@sgarciahelguera I think there's an open PR for farm Profile . here it is #35

@abu-hasib perhaps you can take a look at that 👆🏽 and see if the endpoint you need has been included in that PR and we can work on getting it merged after review

There an endpoint to get / edit a single user profile 👇🏽

userprofile

abu-hasib commented 1 year ago

@mihrab34 @sgarciahelguera I checked the endpoint.

Screen Shot 2023-08-24 at 10 31 27 PM Screen Shot 2023-08-24 at 10 33 18 PM
abu-hasib commented 1 year ago

two things I noted. I was able to create a profile without restriction. The data expected on the frontend does not match the schema. I attach screenshots for reference

sgarciahelguera commented 1 year ago

What specifically do you think that doesn't match?

abu-hasib commented 1 year ago

There is no farm name, about me, past activity and reviews

abu-hasib commented 1 year ago

there is no avatar as well

sgarciahelguera commented 1 year ago

There is no farm name, about me, past activity and reviews

farm name is part of the farm entity, that is a different endpoint. There is a field "about_me", the first one in your snapshot, if you copy the text and quote it here I can point you to it. reviews and past activity are not implemented, won't be soon either, we need more progress on other areas before these even make sense.

sgarciahelguera commented 1 year ago

there is no avatar as well

There is a userprofilephoto

sgarciahelguera commented 1 year ago

Location fields are open to debate, if you for example integrate google maps in the UI, and find out that you require different fields, we can change them (we need to integrate something, so that address is not just a string, doesn't have to be google maps)

sgarciahelguera commented 1 year ago

maybe that is something for the backend to provide too

abu-hasib commented 1 year ago

there is no avatar as well

There is a userprofilephoto

Where? I can't find it.

sgarciahelguera commented 1 year ago

swagger has a search field, just type in photo. It is an endpoint separate from the profile, that is probably why you missed it. There is already an issue to move it under the profile path (#31)