Updated group category check in group_editor action
• Updated: - group category check in group_editor action
This commit is contained in:
parent
345fc0bfb3
commit
86e3d3aaf2
@ -65,7 +65,6 @@ const create = (options, routerHistory) => (dispatch, getState) => {
|
|||||||
formData.append('title', options.title)
|
formData.append('title', options.title)
|
||||||
formData.append('description', options.description)
|
formData.append('description', options.description)
|
||||||
formData.append('tags', options.tags)
|
formData.append('tags', options.tags)
|
||||||
formData.append('group_category_id', options.category)
|
|
||||||
formData.append('is_private', options.isPrivate)
|
formData.append('is_private', options.isPrivate)
|
||||||
formData.append('is_visible', options.isVisible)
|
formData.append('is_visible', options.isVisible)
|
||||||
formData.append('password', options.password)
|
formData.append('password', options.password)
|
||||||
@ -73,6 +72,9 @@ const create = (options, routerHistory) => (dispatch, getState) => {
|
|||||||
if (options.coverImage !== null) {
|
if (options.coverImage !== null) {
|
||||||
formData.append('cover_image', options.coverImage)
|
formData.append('cover_image', options.coverImage)
|
||||||
}
|
}
|
||||||
|
if (options.category !== null) {
|
||||||
|
formData.append('group_category_id', options.category)
|
||||||
|
}
|
||||||
|
|
||||||
api(getState).post('/api/v1/groups', formData, {
|
api(getState).post('/api/v1/groups', formData, {
|
||||||
headers: {
|
headers: {
|
||||||
@ -109,7 +111,6 @@ const update = (groupId, options, routerHistory) => (dispatch, getState) => {
|
|||||||
formData.append('title', options.title)
|
formData.append('title', options.title)
|
||||||
formData.append('description', options.description)
|
formData.append('description', options.description)
|
||||||
formData.append('tags', options.tags)
|
formData.append('tags', options.tags)
|
||||||
formData.append('group_category_id', options.category)
|
|
||||||
formData.append('is_private', options.isPrivate)
|
formData.append('is_private', options.isPrivate)
|
||||||
formData.append('is_visible', options.isVisible)
|
formData.append('is_visible', options.isVisible)
|
||||||
formData.append('password', options.password)
|
formData.append('password', options.password)
|
||||||
@ -120,6 +121,9 @@ const update = (groupId, options, routerHistory) => (dispatch, getState) => {
|
|||||||
if (options.coverImage !== null) {
|
if (options.coverImage !== null) {
|
||||||
formData.append('cover_image', options.coverImage)
|
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, {
|
api(getState).put(`/api/v1/groups/${groupId}`, formData, {
|
||||||
headers: {
|
headers: {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user