{"size": 186, "ext": "js", "max_stars_repo_path": "v3/middleware/loginCheck.js", "max_stars_repo_name": "yang657850144/koa-blog", "max_stars_repo_stars_event_min_datetime": "2019-11-16T15:30:11.000Z", "max_stars_repo_stars_event_max_datetime": "2019-11-16T15:30:11.000Z", "max_issues_repo_path": "v3/middleware/loginCheck.js", "max_issues_repo_name": "yang657850144/koa-blog", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "v3/middleware/loginCheck.js", "max_forks_repo_name": "yang657850144/koa-blog", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 1, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 18.6, "max_line_length": 47, "alphanum_fraction": 0.6129032258}
const ErrorRes = require('./../modal/ErrorRes')

module.exports = async (ctx, next) => {
  if (ctx.session.username) {
    await next()
    return
  }
  ctx.body = new ErrorRes('未登录')
}
