feat: 
Implement `UpdateGroup` Resolver

Created by: Tirokk

Pull Request

Implement UpdateGroup
resolver.
Issues
- relates #5131 (closed)
- relates #5059 (closed)
Todo
-
GraphQL -
add group settings ( details see https://github.com/Ocelot-Social-Community/Ocelot-Social/issues/5059#user-content-group-settings ) -
categories -
avatar -
location
-
-
-
tests: -
general -
slugification -
if we change the name so that an existing slug will be generated that it is made unique by *-1
-
-
test if resolver Group
finds group byid
-
does avatar testing make sense this way in backend/src/schema/resolvers/user_management.spec.js
-
minimum: await is missing … -
search for other appearances of avatar: Factory.build('image',
orFactory.build('image'
without await -
created an issue #5256 (closed)
-
-
-
cleanup: search for Wolle
Merge request reports
Activity
Filter activity
131 133 session.close() 132 134 } 133 135 }, 136 UpdateGroup: async (_parent, params, context, _resolveInfo) => { 137 const { categoryIds } = params 138 const { id: groupId, avatar: avatarInput } = params 139 delete params.categoryIds 140 if (CONFIG.CATEGORIES_ACTIVE && categoryIds) { Created by: Tirokk
If
categoriesIds
arenull
orundefined
they are not changed in any way.If
categoriesIds
are[]
an error is thrown ifCONFIG.CATEGORIES_ACTIVE === true
. If the array is not empty the old are deleted and new are set.But there's no type check if it's an array. You thing it's needed?
Please register or sign in to reply