From b9292637fecbf2fd6077eaeb3c6e43c6099baf1a Mon Sep 17 00:00:00 2001 From: Idhibhat Pankam Date: Tue, 16 Jul 2024 22:36:21 +0700 Subject: [PATCH] fix: can checkin multiples --- internal/checkin/checkin.service.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/internal/checkin/checkin.service.go b/internal/checkin/checkin.service.go index 8071585..688c05a 100644 --- a/internal/checkin/checkin.service.go +++ b/internal/checkin/checkin.service.go @@ -52,7 +52,9 @@ func (s *serviceImpl) Create(ctx context.Context, req *proto.CreateCheckInReques if v.Event == req.Event && v.UserID == req.UserId { s.log.Named("Create").Warn("Create: User already checkin this event") - return nil, status.Error(codes.AlreadyExists, constant.AlreadyCheckinErrorMessage) + return &proto.CreateCheckInResponse{ + CheckIn: ModelToProto(v), + }, nil } } // span.AddEvent("Verify user checkin not duplicate")