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 28 pet and like endpoints #10

Merged
merged 18 commits into from
Jan 5, 2024

Conversation

macgeargear
Copy link
Contributor

@macgeargear macgeargear commented Jan 5, 2024

  • fix json not return some field if did not provide in body request
  • add image dto and fix other dtos to match each function
  • fix service & handler test
  • add ...RawToDto... and add imageMock for both service and test in utils

Copy link

linear bot commented Jan 5, 2024

JOH-28 Pet and Like endpoints

FindAll - GET /pet

FindOne - GET /pet/:id

Create- POST /pet/create

FindByUserId - GET /like

src/app/service/pet/pet.service.go Show resolved Hide resolved
return imagesList
}

func RawToDto(in *petproto.Pet, images []*imgproto.Image) *dto.PetResponse {
Copy link
Contributor

Choose a reason for hiding this comment

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

In johnjud-backend, Raw = database model, Dto = proto.
In johnjud-gateway, there's Dto = dto model.
So, I think we should change Raw to Proto

Copy link
Contributor

Choose a reason for hiding this comment

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

please also do the same for CreateDtoToRaw, UpdateDtoToRaw, etc. (anything with Raw)

@macgeargear macgeargear merged commit 98d1ea1 into dev Jan 5, 2024
2 checks passed
@bookpanda bookpanda deleted the gear/joh-28-pet-and-like-endpoints branch January 5, 2024 15:10
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