How to use the query function from request

Find comprehensive JavaScript request.query code examples handpicked from public code repositorys.

107
108
109
110
111
112
113
114
115
116
 * 取出一级分类下面的所有网站,并且处理返回
 */
async info() {
  const { request, model } = this.ctx
  try {
    const { id, categoryId } = request.query
    let resData: any = []
    // 取所有子分类
    const categorys = await model.Category.find({ categoryId })
    const categoryIds = categorys.reduce((t, v) => [...t, v._id], [])
fork icon426
star icon0
watch icon37

119
120
121
122
123
124
125
126
127
128
129
  return new Error('ユーザー名かパスワードが間違っています。');
};
fastify.register(require('@fastify/basic-auth'), { validate, authenticate });


fastify.get('/cronjob_*', async (request, reply) => {
  let params = request.query.raw ? {} : { cronjob: true, url: url, };
  return request.query.raw
    ? reply.send(params)
    : reply.view('/src/pages/index.hbs', params);
});
fork icon0
star icon0
watch icon0

+ 19 other calls in file

2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
    var regex = /(\d+)/g;
    var bal = result.match(regex);



if (request.query.transStatus == 'success' || request.query.transStatus == 'Success') {

    db.findOne({recharge_id: request.query.accountId}, function (err, rechgData) {

        if (rechgData) {
fork icon0
star icon0
watch icon0

+ 13 other calls in file