Download pool/shard007/JavaScript/0044062_getTask.js from Variable-role/sajaniemi_variable_dataset_large: direct link, hf CLI and curl.
- Browser
- Download file 270 Bytes
-
https://huggingface.co/datasets/Variable-role/sajaniemi_variable_dataset_large/resolve/main/pool/shard007/JavaScript/0044062_getTask.js
- Command line
-
hf download hf://datasets/Variable-role/sajaniemi_variable_dataset_large/pool/shard007/JavaScript/0044062_getTask.js
-
curl -L -o 0044062_getTask.js https://huggingface.co/datasets/Variable-role/sajaniemi_variable_dataset_large/resolve/main/pool/shard007/JavaScript/0044062_getTask.js
270 Bytes
| const { db } = require('./_helper'); | |
| module.exports = function(data, sess, cookie, qs) { | |
| const value = db.get('task').value(); | |
| if (value && value[data.id]) | |
| return {resultCode:0, data:value[data.id]} | |
| else | |
| return {resultCode:404,resultDescription:'NOT_FOUND'} | |
| } | |