Commit 86e3d3aa authored by mgabdev's avatar mgabdev

Updated group category check in group_editor action

• Updated:
- group category check in group_editor action
parent 345fc0bf
......@@ -65,7 +65,6 @@ const create = (options, routerHistory) => (dispatch, getState) => {
formData.append('title', options.title)
formData.append('description', options.description)
formData.append('tags', options.tags)
formData.append('group_category_id', options.category)
formData.append('is_private', options.isPrivate)
formData.append('is_visible', options.isVisible)
formData.append('password', options.password)
......@@ -73,6 +72,9 @@ const create = (options, routerHistory) => (dispatch, getState) => {
if (options.coverImage !== null) {
formData.append('cover_image', options.coverImage)
}
if (options.category !== null) {
formData.append('group_category_id', options.category)
}
api(getState).post('/api/v1/groups', formData, {
headers: {
......@@ -109,7 +111,6 @@ const update = (groupId, options, routerHistory) => (dispatch, getState) => {
formData.append('title', options.title)
formData.append('description', options.description)
formData.append('tags', options.tags)
formData.append('group_category_id', options.category)
formData.append('is_private', options.isPrivate)
formData.append('is_visible', options.isVisible)
formData.append('password', options.password)
......@@ -120,6 +121,9 @@ const update = (groupId, options, routerHistory) => (dispatch, getState) => {
if (options.coverImage !== null) {
formData.append('cover_image', options.coverImage)
}
if (options.category !== null) {
formData.append('group_category_id', options.category)
}
api(getState).put(`/api/v1/groups/${groupId}`, formData, {
headers: {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment