stoken.js 223 B

123456789
  1. 'use strict';
  2. const _ = require('lodash');
  3. const { ObjectId } = require('mongoose').Types;
  4. module.exports = options => {
  5. return async function stoken(ctx, next) {
  6. await next();
  7. ctx.body.stoken = ctx.csrf;
  8. };
  9. };