<commit_before>/**
 * @author xpress
 * @date 16/1/10
 * @desc
 */


Controller.action(exports, 'index')
    .post()
    .path('/')
    .desc()
    .validate({
        body: {
            username: {type: 'string', required: true, len: {gt: 2, lt: 20}, val: {like: ''}},
            password: {type: 'string', required: true, len: {gt: 2, lt: 20}},
            scores  : {type: 'array',  required: true, len: {gte: 2, lte: 20}, val:{eq: [100, 98]}},
            age     : {type: 'number', required: true, val: {gte: 0, lte: 100}},
            channel : {type: 'number', required: true, val: {eq: 2}},
            height  : {type: 'number', required: true, val: {neq: 10}},
            gender  : {type: 'bool',   required: true, val: {in: [true, false]}},
            mind    : {type: 'number', required: true, val: {nin: [0,1]}}
        }
    })
    .handle( function(req, res, next){
        res.json({
            code: 1,
            msg: null,
            data: {
                version: 1.0
            }
        });
    });



Controller.action(exports, 'index')
    .get()
    .path('/')
    .version(1)
    .channel(2)
    .validate({
        query: {
            token: {type: 'string', required: true, len: {gt: 2, lt: 20}, val: {like: /name/}}
        }
    })
    .handle( function(req, res, next){
        res.json({
            code: 1,
            msg: null,
            data: {
                version: 1.0
            }
        });
    });


Controller.action(exports, 'index')
    .put()
    .validate({
        query: {
            token: {type: 'string', required: true, len: {gt: 2, lt: 20}, val: {like: /name/}}
        }
    })
    .handle( function(req, res, next){
        res.json({
            code: 1,
            msg: null,
            data: {
                version: 1.0
            }
        });
    });



Controller.action(exports, 'index')
    .delete()
    .validate({
        query: {
            token: {type: 'string', required: true, len: {gt: 2, lt: 20}, val: {like: /name/}}
        }
    })
    .handle( function(req, res, next){<commit_msg>add init tools<commit_after>/**
 * @author xpress
 * @date 16/1/10
 * @desc
 */


Controller.action(exports, 'index').post()
    .path('/')
    .desc()
    .validate({
        body: {
            username: {type: 'string', required: true, len: {gt: 2, lt: 20}, val: {like: ''}},
            password: {type: 'string', required: true, len: {gt: 2, lt: 20}},
            scores  : {type: 'array',  required: true, len: {gte: 2, lte: 20}, val:{eq: [100, 98]}},
            age     : {type: 'number', required: true, val: {gte: 0, lte: 100}},
            channel : {type: 'number', required: true, val: {eq: 2}},
            height  : {type: 'number', required: true, val: {neq: 10}},
            gender  : {type: 'bool',   required: true, val: {in: [true, false]}},
            mind    : {type: 'number', required: true, val: {nin: [0,1]}}
        }
    })
    .handle( function(req, res, next){
        res.json({
            code: 1,
            msg: null,
            data: {
                version: 1.0
            }
        });
    });



Controller.action(exports, 'index').get()
    .path('/')
    .version(1)
    .channel(2)
    .validate({
        query: {
            token: {type: 'string', required: true, len: {gt: 2, lt: 20}, val: {like: /name/}}
        }
    })
    .handle( function(req, res, next){
        res.json({
            code: 1,
            msg: null,
            data: {
                version: 1.0
            }
        });
    });


Controller.action(exports, 'index').put()
    .validate({
        query: {
            token: {type: 'string', required: true, len: {gt: 2, lt: 20}, val: {like: /name/}}
        }
    })
    .handle( function(req, res, next){
        res.json({
            code: 1,
            msg: null,
            data: {
                version: 1.0
            }
        });
    });



Controller.action(exports, 'index').delete()
    .validate({
        query: {
            token: {type: 'string', required: true, len: {gt: 2, lt: 20}, val: {like: /name/}}
        }
    })
    .handle( function(req, res, next){
{'fraction_non_alphanumeric': 0.18935196338231752, 'fraction_numerical': 0.02312695735967237, 'mean_word_length': 1.5582255083179297, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6869874', 'n_tokens_mistral': 1457, 'n_tokens_neox': 1352, 'n_words': 373}