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

[JOH-27] User endpoints and Admin middleware #11

Merged
merged 38 commits into from
Jan 10, 2024
Merged

Conversation

bookpanda
Copy link
Contributor

@bookpanda bookpanda commented Jan 5, 2024

Change made

  •  New features
  •  Bug fixes
  •  Breaking changes

Describe what you have done

Add 3 user svc and 3 user handler unit tests:

  • FindOne
  • Update
  • Delete

Add 1 user handler method:

  • Delete

New Features

  • For methods only admin can call, add role check

Fix

  • Fix some error handling in user svc
  • Fix some typo in pet service, handler
  • Fix user handler methods: FindOne, Update
  • User dto file
  • Swagger docs in handler methods
  • Pet Handlers success resp return only dto (before it was ResponseSuccess)
  • Auth middleware detect path with :id

Others

  • Add PR template

FindOne

Screenshot 2567-01-10 at 00 12 11

Update

Screenshot 2567-01-10 at 01 13 24

Delete

as user
Screenshot 2567-01-10 at 01 17 39
as admin
Screenshot 2567-01-10 at 01 20 43

Copy link

linear bot commented Jan 5, 2024

JOH-27 User and Pet endpoints

FindOne - GET /user/:id

Update - PUT /user/:id

Delete- DELETE /user/:id

Update - PUT /pet/:id

ChangeView - PUT /pet/:id/visible

PRs before incorporating Linear

User Service isd-sgcu/johnjud-auth-old#4

Pet Update and ChangeView #9

@bookpanda bookpanda changed the title [JOH-27] User endpoints [JOH-27] User endpoints and Admin middleware Jan 8, 2024
@bookpanda
Copy link
Contributor Author

let me add some postman testing

config/auth/config.example.yaml Show resolved Hide resolved
src/constant/auth/auth.constant.go Outdated Show resolved Hide resolved
src/app/dto/user.dto.go Outdated Show resolved Hide resolved
src/app/handler/user/user.handler.go Outdated Show resolved Hide resolved
src/app/handler/user/user.handler.go Show resolved Hide resolved
src/app/handler/user/user.handler.go Show resolved Hide resolved
@bookpanda bookpanda merged commit 9006fb2 into dev Jan 10, 2024
2 checks passed
@bookpanda bookpanda deleted the JOH-27/user-endpoints branch January 10, 2024 03:50
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