From 5456e59f0bb0534f3f63fd28da417576892bce30 Mon Sep 17 00:00:00 2001 From: DeniskaRediska Date: Wed, 25 Aug 2021 18:45:30 +0300 Subject: [PATCH] MSP-247 add role to response /user/get_profile --- controller/user.go | 1 + structure/user.go | 1 + 2 files changed, 2 insertions(+) diff --git a/controller/user.go b/controller/user.go index d3566c3..6c2ae14 100644 --- a/controller/user.go +++ b/controller/user.go @@ -75,6 +75,7 @@ func GetProfile(metadata metadata.MD) (*structure.AdminUserShort, error) { LastName: user.LastName, Email: user.Email, Phone: user.Phone, + Role: role.Name, }, nil } diff --git a/structure/user.go b/structure/user.go index 4f8b709..89e9cf7 100644 --- a/structure/user.go +++ b/structure/user.go @@ -23,4 +23,5 @@ type AdminUserShort struct { LastName string `json:"lastName"` Email string `json:"email" valid:"required~Required"` Phone string `json:"phone"` + Role string `json:"role"` }