Skip to content

Commit

Permalink
Adjust slack channel endpoint (#660)
Browse files Browse the repository at this point in the history
  • Loading branch information
kyle-ssg authored Jan 7, 2022
1 parent fb1a3dd commit 06b3d90
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions frontend/web/components/modals/CreateEditIntegrationModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ const CreateEditIntegration = class extends Component {
const fields = _.cloneDeep(this.props.integration.fields)
this.state = { fields, data: this.props.data ? { ...this.props.data } : {fields} };
if (this.props.id === "slack" && this.state.data.flagsmithEnvironment) {
_data.get(`${Project.api}environments/${this.state.data.flagsmithEnvironment}/integrations/${this.props.id}/channels`)
_data.get(`${Project.api}environments/${this.state.data.flagsmithEnvironment}/integrations/${this.props.id}-channels?limit=1000`)
.then((res)=>{
this.state.data.enabled = true
this.state.fields = this.state.fields || []
this.state.fields.push({
key:"channel_id",
label: "Channel",
options:res.map((v)=>(
options:((res && res.channels)||[]).map((v)=>(
{label:v.channel_name,value:v.channel_id}
))
})
Expand Down

0 comments on commit 06b3d90

Please sign in to comment.