1
0
mirror of https://github.com/raseels-repos/golang-saas-starter-kit.git synced 2025-08-06 22:32:51 +02:00

invite users

This commit is contained in:
Lee Brown
2019-08-05 13:27:23 -08:00
parent 56363828aa
commit 49c28c5aea
12 changed files with 495 additions and 63 deletions

View File

@ -328,6 +328,10 @@ func (m *User) Response(ctx context.Context) *UserResponse {
Gravatar: web.NewGravatarResponse(ctx, m.Email),
}
if r.Name == "" {
r.Name = r.Email
}
if m.ArchivedAt != nil && !m.ArchivedAt.Time.IsZero() {
at := web.NewTimeResponse(ctx, m.ArchivedAt.Time)
r.ArchivedAt = &at