Skip to content

Commit

Permalink
fix: use Service from pkg
Browse files Browse the repository at this point in the history
  • Loading branch information
macgeargear committed Jan 6, 2024
1 parent 19729f4 commit f87e1bc
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions src/app/handler/image/image.handler.go
Original file line number Diff line number Diff line change
@@ -1,24 +1,17 @@
package auth

import (
"github.com/isd-sgcu/johnjud-gateway/src/app/dto"
"github.com/isd-sgcu/johnjud-gateway/src/app/router"
"github.com/isd-sgcu/johnjud-gateway/src/app/validator"
proto "github.com/isd-sgcu/johnjud-go-proto/johnjud/file/image/v1"
imageSvc "github.com/isd-sgcu/johnjud-gateway/src/pkg/service/image"
)

type Handler struct {
service Service
service imageSvc.Service
validate *validator.DtoValidator
}

type Service interface {
FindByPetId(string) ([]*proto.Image, *dto.ResponseErr)
Upload(*dto.ImageDto) (*proto.Image, *dto.ResponseErr)
Delete(string) (bool, *dto.ResponseErr)
}

func NewHandler(service Service, validate *validator.DtoValidator) *Handler {
func NewHandler(service imageSvc.Service, validate *validator.DtoValidator) *Handler {
return &Handler{service, validate}
}

Expand Down

0 comments on commit f87e1bc

Please sign in to comment.