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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add following user infos in the following endpoint #428

Draft
wants to merge 1 commit into
base: beta
Choose a base branch
from

Conversation

takanome-dev
Copy link
Contributor

Description

This pr adds the following_user in the following endpoint response which is the following user's data.

What type of PR is this? (check all applicable)

  • πŸ• Feature
  • πŸ› Bug Fix
  • πŸ“ Documentation Update
  • 🎨 Style
  • πŸ§‘β€πŸ’» Code Refactor
  • πŸ”₯ Performance Improvements
  • βœ… Test
  • πŸ€– Build
  • πŸ” CI
  • πŸ“¦ Chore (Release)
  • ⏩ Revert

Related Tickets & Documents

Fixes #426

Mobile & Desktop Screenshots/Recordings

Added tests?

  • πŸ‘ yes
  • πŸ™… no, because they aren't needed
  • πŸ™‹ no, because I need help

Added to documentation?

  • πŸ“œ README.md
  • πŸ““ docs.opensauced.pizza
  • πŸ• dev.to/opensauced
  • πŸ“• storybook
  • πŸ™… no documentation needed

[optional] Are there any post-deployment tasks we need to perform?

[optional] What gif best describes this PR or how it makes you feel?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why the extra jest config? this breaks tests:

Run npm run test --if-present
npm info using [email protected]
npm info using [email protected]

> @open-sauced/[email protected] test
> jest

● Multiple configurations found:

    * /home/runner/work/api/api/jest.config.json
    * `jest` key in /home/runner/work/api/api/package.json

  Implicit config resolution does not allow multiple configuration files.
  Either remove unused config files or select one explicitly with `--config`.

  Configuration Documentation:
  https://jestjs.io/docs/configuration

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh sorry, I didn't notice that. I was trying to add e2e test (it's another open issue) and stash the changes, but didn't realize the jest config was untracked. Will revert it πŸ‘

@takanome-dev
Copy link
Contributor Author

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. Any help is appreciated πŸ™

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enhancement: add more usable data to the response of user following endpoint
2 participants