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

Feature/editing get user by #49

Merged
merged 5 commits into from
Oct 16, 2024
Merged

Feature/editing get user by #49

merged 5 commits into from
Oct 16, 2024

Conversation

abyan-n
Copy link
Collaborator

@abyan-n abyan-n commented Oct 16, 2024

Description

No Ticket

Please include a summary of the changes and the related issue. Please also
include relevant motivation, context, and images!

Added a get user endpoint using email, id, or username. Also added a getAllUsers endpoint (can delete this later, good for testing)

How Has This Been Tested?

Postman

Please describe the tests that you ran to verify your changes. If they are unit
tests, provide the file name the tests are in. If they are not unit tests,
describe how you tested the change.

Postman tests using get with diff url

Checklist

  • [ X] I have performed a self-review of my code
  • [ X] I have reached out to another developer to review my code
  • [ X] I have commented my code, particularly in hard-to-understand areas
  • [X ] New and existing unit tests pass locally with my changes

Copy link
Collaborator

@benjaspet benjaspet left a comment

Choose a reason for hiding this comment

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

Looks great! I just have a few recommendations for optimizations and abstraction.

backend/internal/storage/postgres/profiles.go Outdated Show resolved Hide resolved
backend/internal/utils/validators.go Outdated Show resolved Hide resolved
abyan-n and others added 3 commits October 16, 2024 10:25
* dropping all tables migration file

* Database migrations, deleted old tables and created new ones with proper names

* renamed user table to users. Fixed all sql queries to use new tables names.

* Small sql fix
@benjaspet benjaspet self-assigned this Oct 16, 2024
Copy link
Collaborator

@benjaspet benjaspet left a comment

Choose a reason for hiding this comment

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

Great work!

@abyan-n abyan-n merged commit 69da43b into main Oct 16, 2024
3 checks passed
@abyan-n abyan-n deleted the feature/editing-get-user-by-id branch October 16, 2024 14:46
abyan-n added a commit that referenced this pull request Oct 22, 2024
* Refactored profile folder into profiles

* Added get user endpoints for id, email and username. Also added a getAllUsers

* Db/rename all tables (#50)

* dropping all tables migration file

* Database migrations, deleted old tables and created new ones with proper names

* renamed user table to users. Fixed all sql queries to use new tables names.

* Small sql fix

* Abstracted + email regex
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.

2 participants