func ToOrganization(org *models.User) *api.Organization { return &api.Organization{ ID: org.Id, AvatarUrl: org.AvatarLink(), UserName: org.Name, FullName: org.FullName, Description: org.Description, Website: org.Website, Location: org.Location, } }
func ToUser(u *models.User) *api.User { if u == nil { return nil } return &api.User{ ID: u.Id, UserName: u.Name, FullName: u.FullName, Email: u.Email, AvatarUrl: u.AvatarLink(), } }