🐛 Fix grpc userinfo api get avatar id not url
This commit is contained in:
parent
c169ffdacd
commit
bb65b11566
@ -5,6 +5,7 @@ import (
|
|||||||
"code.smartsheep.studio/hydrogen/identity/pkg/models"
|
"code.smartsheep.studio/hydrogen/identity/pkg/models"
|
||||||
"code.smartsheep.studio/hydrogen/identity/pkg/services"
|
"code.smartsheep.studio/hydrogen/identity/pkg/services"
|
||||||
"context"
|
"context"
|
||||||
|
"fmt"
|
||||||
"github.com/samber/lo"
|
"github.com/samber/lo"
|
||||||
"github.com/spf13/viper"
|
"github.com/spf13/viper"
|
||||||
"google.golang.org/grpc"
|
"google.golang.org/grpc"
|
||||||
@ -31,8 +32,8 @@ func (v *Server) Authenticate(_ context.Context, in *proto.AuthRequest) (*proto.
|
|||||||
Userinfo: &proto.Userinfo{
|
Userinfo: &proto.Userinfo{
|
||||||
Name: user.Name,
|
Name: user.Name,
|
||||||
Nick: user.Nick,
|
Nick: user.Nick,
|
||||||
Avatar: user.Avatar,
|
|
||||||
Email: user.GetPrimaryEmail().Content,
|
Email: user.GetPrimaryEmail().Content,
|
||||||
|
Avatar: fmt.Sprintf("https://%s/api/avatar/%s", viper.GetString("domain"), user.Avatar),
|
||||||
Description: nil,
|
Description: nil,
|
||||||
},
|
},
|
||||||
}, nil
|
}, nil
|
||||||
|
Loading…
Reference in New Issue
Block a user