TP-0000 | adding channel id in team response (#82)
This commit is contained in:
committed by
GitHub Enterprise
parent
957f2fa32a
commit
7bb1e1dcdc
@@ -14,6 +14,7 @@ type TeamResponse struct {
|
||||
Participants []UserResponse `json:"participants,omitempty"`
|
||||
UpdatedAt time.Time `json:"lastUpdatedAt,omitempty"`
|
||||
WebhookSlackChannelName string `json:"webhookSlackChannelName"`
|
||||
WebhookSlackChannelId string `json:"webhookSlackChannelId"`
|
||||
}
|
||||
|
||||
func ConvertToTeamResponse(teamEntity team.TeamEntity) TeamResponse {
|
||||
|
||||
@@ -68,6 +68,7 @@ func (t *teamService) GetTeams(c *gin.Context) {
|
||||
}
|
||||
channel, err := t.client.GetConversationInfo(team.WebhookSlackChannel)
|
||||
teamResponse := service.ConvertToTeamResponse(*team)
|
||||
teamResponse.WebhookSlackChannelId = team.WebhookSlackChannel
|
||||
if err != nil {
|
||||
t.logger.Error("error in getting channel info", zap.String("channelId", team.WebhookSlackChannel), zap.Error(err))
|
||||
teamResponse.WebhookSlackChannelName = "not found"
|
||||
|
||||
Reference in New Issue
Block a user