Skip to content
Snippets Groups Projects
Commit bcb48e89 authored by gfalileev's avatar gfalileev Committed by George Falileev
Browse files

MP-579: convert email to lower case when creates invitation

(cherry picked from commit a5d5565f)
parent 300118e3
Branches
Tags
No related merge requests found
......@@ -3,6 +3,7 @@ package service
import (
"context"
"errors"
"strings"
"time"
"gitlab.mashroom.com/mashroom/backend/common/api/grpcctx"
......@@ -42,7 +43,7 @@ func (srv *serviceImpl) InvitationCreate(
HostID: req.GetHostId(),
Invitee: model.User{
UserID: req.GetInvitee().GetUserId(),
Email: req.GetInvitee().GetEmail(),
Email: strings.ToLower(req.GetInvitee().GetEmail()),
Name: req.GetInvitee().GetName(),
Phone: req.GetInvitee().GetPhone(),
},
......
......@@ -4,6 +4,7 @@ import (
"context"
"encoding/json"
"net/http"
"strings"
"gitlab.mashroom.com/mashroom/backend/common/api/grpcerr"
"gitlab.mashroom.com/mashroom/backend/common/generic/log"
......@@ -67,7 +68,7 @@ func (srv *serviceImpl) LandlordReferenceSave(
{
Role: notification.Role_ROLE_LANDLORD,
Contacts: &notification.Contacts{
Email: req.GetInvitee().GetEmail(),
Email: strings.ToLower(req.GetInvitee().GetEmail()),
Phone: req.GetInvitee().GetPhone(),
Fullname: req.GetInvitee().GetName(),
},
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment