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

Gear/joh 54 johnjud gateway image endopint #22

Merged
merged 34 commits into from
Jan 11, 2024

Conversation

macgeargear
Copy link
Contributor

Change made

  •  Bug fixes
  •  New features
  •  Breaking changes

Describe what you have done

  • add image service & handler (no test)

New Features

  • image end point

Fix

Others

Copy link

linear bot commented Jan 10, 2024

Copy link
Contributor

@bookpanda bookpanda left a comment

Choose a reason for hiding this comment

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

Actually, Image needs one more endpoint: AssignPet: POST /image/assign/:pet_id
(FindByPetId doesn't have to be an endpoint as we'll call it in backend's pet service, but you don't have to remove the code).

Also, I think main.go still doesn't have these set as endpoints.
Please also add Upload, Delete, AssignPet paths to AdminPath and FindByPetId to ExcludePath in auth.constant.go

src/app/service/image/image.service.go Outdated Show resolved Hide resolved
src/app/handler/image/image.handler.go Outdated Show resolved Hide resolved
@macgeargear
Copy link
Contributor Author

Actually, Image needs one more endpoint: AssignPet: POST /image/assign/:pet_id (FindByPetId doesn't have to be an endpoint as we'll call it in backend's pet service, but you don't have to remove the code).

Also, I think main.go still doesn't have these set as endpoints. Please also add Upload, Delete, AssignPet paths to AdminPath and FindByPetId to ExcludePath in auth.constant.go

the end point you want me to remove in main.go is just FindByPetId and the rest still the same right?, and one more thing, how can i signup as admin because when i want to test api call e.g. POST pet it'll block by auth middleware (i have to comment keys AdminPath in auth.constant.go)

src/app/dto/image.dto.go Outdated Show resolved Hide resolved
src/app/handler/image/image.handler.go Outdated Show resolved Hide resolved
src/app/service/image/image.service.go Show resolved Hide resolved
src/constant/auth/auth.constant.go Outdated Show resolved Hide resolved
src/main.go Show resolved Hide resolved
@bookpanda
Copy link
Contributor

Actually, Image needs one more endpoint: AssignPet: POST /image/assign/:pet_id (FindByPetId doesn't have to be an endpoint as we'll call it in backend's pet service, but you don't have to remove the code).
Also, I think main.go still doesn't have these set as endpoints. Please also add Upload, Delete, AssignPet paths to AdminPath and FindByPetId to ExcludePath in auth.constant.go

the end point you want me to remove in main.go is just FindByPetId and the rest still the same right?, and one more thing, how can i signup as admin because when i want to test api call e.g. POST pet it'll block by auth middleware (i have to comment keys AdminPath in auth.constant.go)

Yes, remove only FindByPetId and add AssignPet.

You can signup, then signin, get the token, add it in auth section of postman (bearer token), no need to add Bearer in front of token

I think no need to use `/assign/:pet_id` because they're already in body request
src/app/dto/image.dto.go Outdated Show resolved Hide resolved
src/app/router/image.router.go Outdated Show resolved Hide resolved
@macgeargear macgeargear merged commit ee1704b into dev Jan 11, 2024
2 checks passed
@macgeargear macgeargear deleted the gear/joh-54-johnjud-gateway-image-endopint branch January 11, 2024 10:41
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