Skip to content

Commit

Permalink
Merge pull request #45 from isd-sgcu/dev
Browse files Browse the repository at this point in the history
update main
  • Loading branch information
bookpanda authored Jul 21, 2024
2 parents 7da55a0 + 127a3ff commit c292b0e
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 2 deletions.
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ require (
github.com/go-playground/validator/v10 v10.22.0
github.com/golang/mock v1.6.0
github.com/google/uuid v1.6.0
github.com/isd-sgcu/rpkm67-go-proto v0.5.3
github.com/isd-sgcu/rpkm67-model v0.2.0
github.com/isd-sgcu/rpkm67-go-proto v0.5.4
github.com/isd-sgcu/rpkm67-model v0.2.1
github.com/joho/godotenv v1.5.1
github.com/prometheus/client_golang v1.19.1
github.com/stretchr/testify v1.9.0
Expand Down
4 changes: 4 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,14 @@ github.com/isd-sgcu/rpkm67-go-proto v0.5.2 h1:CP9oXIa4MrJZd6ynHkVt18YPGlQU0bkDM1
github.com/isd-sgcu/rpkm67-go-proto v0.5.2/go.mod h1:w+UCeQnJ3wBuJ7Tyf8LiBiPZVb1KlecjMNCB7kBeL7M=
github.com/isd-sgcu/rpkm67-go-proto v0.5.3 h1:DMxo3vu5OB2RaODWQwIIFRTyPEyTNMvwmfDbVmVnmnM=
github.com/isd-sgcu/rpkm67-go-proto v0.5.3/go.mod h1:w+UCeQnJ3wBuJ7Tyf8LiBiPZVb1KlecjMNCB7kBeL7M=
github.com/isd-sgcu/rpkm67-go-proto v0.5.4 h1:XcbTKhQFGHiFf10kxsoK8oyZ2v1b2uQ2gmOmzI5sEYE=
github.com/isd-sgcu/rpkm67-go-proto v0.5.4/go.mod h1:w+UCeQnJ3wBuJ7Tyf8LiBiPZVb1KlecjMNCB7kBeL7M=
github.com/isd-sgcu/rpkm67-model v0.0.7 h1:3b8gf1Ocg+Ky4xocKtCqVCB3rFDg90IgEXRwNmHt0OE=
github.com/isd-sgcu/rpkm67-model v0.0.7/go.mod h1:dxgLSkrFpbQOXsrzqgepZoEOyZUIG2LBGtm5gsuBbVc=
github.com/isd-sgcu/rpkm67-model v0.2.0 h1:D2KytmevtV9/3FwfA7FiKo2UKa3jC8knZI97vwRuboA=
github.com/isd-sgcu/rpkm67-model v0.2.0/go.mod h1:dxgLSkrFpbQOXsrzqgepZoEOyZUIG2LBGtm5gsuBbVc=
github.com/isd-sgcu/rpkm67-model v0.2.1 h1:O6mZeZqDjGbiEJa5zzbf6cVwz4uVOtQTuAxnkLj+2oQ=
github.com/isd-sgcu/rpkm67-model v0.2.1/go.mod h1:dxgLSkrFpbQOXsrzqgepZoEOyZUIG2LBGtm5gsuBbVc=
github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsIM=
github.com/jackc/pgpassfile v1.0.0/go.mod h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5eyVu/W2HEg=
github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a h1:bbPeKD0xmW/Y25WS6cokEszi5g+S0QxI/d45PkRi7Nk=
Expand Down
2 changes: 2 additions & 0 deletions internal/dto/stamp.dto.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,13 @@ type StampByUserIdRequest struct {
UserID string `json:"user_id"`
ActivityId string `json:"activity_id"`
PinCode string `json:"pin_code"`
Answer string `json:"answer"`
}

type StampByUserIdBodyRequest struct {
ActivityId string `json:"activity_id"`
PinCode string `json:"pin_code"`
Answer string `json:"answer"`
}

type StampByUserIdResponse struct {
Expand Down
1 change: 1 addition & 0 deletions internal/stamp/stamp.handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ func (h *handlerImpl) StampByUserId(c context.Ctx) {
UserID: userId,
ActivityId: body.ActivityId,
PinCode: body.PinCode,
Answer: body.Answer,
}

res, appErr := h.svc.StampByUserId(req)
Expand Down
1 change: 1 addition & 0 deletions internal/stamp/stamp.service.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ func (s *serviceImpl) StampByUserId(req *dto.StampByUserIdRequest) (*dto.StampBy
res, err := s.client.StampByUserId(ctx, &stampProto.StampByUserIdRequest{
UserId: req.UserID,
ActivityId: req.ActivityId,
Answer: req.Answer,
})
if err != nil {
s.logger.Named("StampByUserId").Error("StampByUserId: ", zap.Error(err))
Expand Down

0 comments on commit c292b0e

Please sign in to comment.