mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2025-12-13 07:45:56 +00:00
insure that user context is present as posts can be queried without authentication
This commit is contained in:
parent
16a24bfddf
commit
32d3c5e904
@ -31,7 +31,7 @@ const setPostCounter = async (postId, relation, context) => {
|
||||
}
|
||||
|
||||
const userClickedPost = async (resolve, root, args, context, info) => {
|
||||
if (args.id) {
|
||||
if (args.id && context.user) {
|
||||
await setPostCounter(args.id, 'CLICKED', context)
|
||||
}
|
||||
return resolve(root, args, context, info)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user