Skip to content

Commit

Permalink
chore
Browse files Browse the repository at this point in the history
  • Loading branch information
macgeargear committed Jan 11, 2024
1 parent 2644a3c commit ade717f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 10 deletions.
4 changes: 2 additions & 2 deletions src/app/dto/image.dto.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ type DeleteImageResponse struct {
}

type AssignPetRequest struct {
Ids []string `json:"ids"`
PetId string `json:"pet_id"`
Ids []string `json:"ids" validate:"required"`
PetId string `json:"pet_id" validate:"required"`
}

type AssignPetResponse struct {
Expand Down
7 changes: 0 additions & 7 deletions src/app/router/image.router.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,3 @@ func (r *FiberRouter) GetImage(path string, h func(ctx *FiberCtx)) {
return nil
})
}

func (r *FiberRouter) AssignPet(path string, h func(ctx *FiberCtx)) {
r.image.Post(path, func(c *fiber.Ctx) error {
h(NewFiberCtx(c))
return nil
})
}
2 changes: 1 addition & 1 deletion src/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ func main() {

r.PostImage("/", imageHandler.Upload)
r.DeleteImage("/:id", imageHandler.Delete)
r.AssignPet("/assign", imageHandler.AssignPet)
r.PostImage("/assign", imageHandler.AssignPet)

v1 := router.NewAPIv1(r, conf.App)

Expand Down

0 comments on commit ade717f

Please sign in to comment.