Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement: add more usable data to the response of user following endpoint #426

Open
1 of 2 tasks
takanome-dev opened this issue Dec 1, 2023 · 6 comments 路 May be fixed by #428
Open
1 of 2 tasks

Enhancement: add more usable data to the response of user following endpoint #426

takanome-dev opened this issue Dec 1, 2023 · 6 comments 路 May be fixed by #428
Assignees
Labels
馃挕 feature A label to note if work is a feature 馃憖 needs triage

Comments

@takanome-dev
Copy link
Contributor

takanome-dev commented Dec 1, 2023

Type of feature

馃崟 Feature

Current behavior

Right now, the endpoint only returns the user id. This doesn't make it easy to create the following page without making an extra api call to get each user's data.

Suggested solution

Additional user's data such as the username and `` can be very useful to generate a link to the user's profile and their profile picture

Additional context

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Contributing Docs

  • I agree to follow this project's Contribution Docs
@takanome-dev takanome-dev added 馃憖 needs triage 馃挕 feature A label to note if work is a feature labels Dec 1, 2023
@nickytonline
Copy link
Member

Which endpoint are you referring to?

@a0m0rajab
Copy link
Contributor

a0m0rajab commented Dec 1, 2023

This is related to the following endpoint: https://beta.api.opensauced.pizza/#/User%20service/getFollowingListByUsername and this issue as well: #425

@takanome-dev
Copy link
Contributor Author

Hey @nickytonline, I'm trying to add the following_user in the response which is a relation between the DbUserToUserFollows entity and DbUser but I cannot test it right now because of the following error:

/home/takanome_dev/projects/open-source/open-sauced/api.opensauced.pizza/src/driver/postgres/PostgresQueryRunner.ts:299
            throw new QueryFailedError(query, parameters, err)
                  ^
QueryFailedError: relation "logs" does not exist
    at PostgresQueryRunner.query (/home/takanome_dev/projects/open-source/open-sauced/api.opensauced.pizza/src/driver/postgres/PostgresQueryRunner.ts:299:19)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at InsertQueryBuilder.execute (/home/takanome_dev/projects/open-source/open-sauced/api.opensauced.pizza/src/query-builder/InsertQueryBuilder.ts:163:33)
    at SubjectExecutor.executeInsertOperations (/home/takanome_dev/projects/open-source/open-sauced/api.opensauced.pizza/src/persistence/SubjectExecutor.ts:434:42)
    at SubjectExecutor.execute (/home/takanome_dev/projects/open-source/open-sauced/api.opensauced.pizza/src/persistence/SubjectExecutor.ts:137:9)
    at EntityPersistExecutor.execute (/home/takanome_dev/projects/open-source/open-sauced/api.opensauced.pizza/src/persistence/EntityPersistExecutor.ts:197:21)
    at LogService.createLog (/home/takanome_dev/projects/open-source/open-sauced/api.opensauced.pizza/src/log/log.service.ts:17:5)
^C

I think I might miss a couple of migrations but I couldn't find the relation logs that the error is referring to.

@takanome-dev
Copy link
Contributor Author

.take

Copy link

github-actions bot commented Dec 1, 2023

Thanks for taking this on! If you have not already, join the conversation in our Discord

@takanome-dev takanome-dev linked a pull request Dec 1, 2023 that will close this issue
19 tasks
@a0m0rajab
Copy link
Contributor

Related issue open-sauced/app#1452

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
馃挕 feature A label to note if work is a feature 馃憖 needs triage
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants