Download spectrum/api/queries/thread/isCreator.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 300 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/spectrum/api/queries/thread/isCreator.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/spectrum/api/queries/thread/isCreator.js
-
curl -L -o isCreator.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/spectrum/api/queries/thread/isCreator.js
300 Bytes
| // @flow | |
| /* | |
| DEPRECATED 2/8/2018 by @brian | |
| */ | |
| import type { GraphQLContext } from '../../'; | |
| import type { DBThread } from 'shared/types'; | |
| export default ({ creatorId }: DBThread, _: any, { user }: GraphQLContext) => { | |
| if (!creatorId || !user) return false; | |
| return user.id === creatorId; | |
| }; | |