Download spectrum/api/queries/user/channelConnection.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 313 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/spectrum/api/queries/user/channelConnection.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/spectrum/api/queries/user/channelConnection.js
-
curl -L -o channelConnection.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/spectrum/api/queries/user/channelConnection.js
313 Bytes
| // @flow | |
| import type { DBUser } from 'shared/types'; | |
| import { getChannelsByUser } from '../../models/channel'; | |
| export default (user: DBUser) => ({ | |
| pageInfo: { | |
| hasNextPage: false, | |
| }, | |
| edges: getChannelsByUser(user.id).then(channels => | |
| channels.map(channel => ({ | |
| node: channel, | |
| })) | |
| ), | |
| }); | |