mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2025-12-13 07:45:56 +00:00
Add content excerpt also on update
This commit is contained in:
parent
8c36d9a740
commit
827687b3bc
@ -7,15 +7,30 @@ export default {
|
||||
const result = await resolve(root, args, context, info)
|
||||
return result
|
||||
},
|
||||
UpdatePost: async (resolve, root, args, context, info) => {
|
||||
args.contentExcerpt = trunc(args.content, 120).html
|
||||
const result = await resolve(root, args, context, info)
|
||||
return result
|
||||
},
|
||||
CreateComment: async (resolve, root, args, context, info) => {
|
||||
args.contentExcerpt = trunc(args.content, 180).html
|
||||
const result = await resolve(root, args, context, info)
|
||||
return result
|
||||
},
|
||||
UpdateComment: async (resolve, root, args, context, info) => {
|
||||
args.contentExcerpt = trunc(args.content, 180).html
|
||||
const result = await resolve(root, args, context, info)
|
||||
return result
|
||||
},
|
||||
CreateOrganization: async (resolve, root, args, context, info) => {
|
||||
args.descriptionExcerpt = trunc(args.description, 120).html
|
||||
const result = await resolve(root, args, context, info)
|
||||
return result
|
||||
},
|
||||
UpdateOrganization: async (resolve, root, args, context, info) => {
|
||||
args.descriptionExcerpt = trunc(args.description, 120).html
|
||||
const result = await resolve(root, args, context, info)
|
||||
return result
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user