• This project
    • Loading...
  • Sign in

박유빈 / likeBack

%ea%b7%b8%eb%a6%bc1
Go to a project
Toggle navigation Toggle navigation pinning
  • Projects
  • Groups
  • Snippets
  • Help
  • Project
  • Activity
  • Repository
  • Graphs
  • Network
  • Create a new issue
  • Commits
  • Issue Boards
  • Files
  • Commits
  • Network
  • Compare
  • Branches
  • Tags
Switch branch/tag
  • likeBack
  • src
  • lib
  • checkLoggedIn.js
  • 박유빈's avatar
    seperate back and front code · beb3ae17
    beb3ae17
    박유빈 authored 2021-12-04 23:36:12 +0900
checkLoggedIn.js 227 Bytes
Raw Blame History Permalink
1 2 3 4 5 6 7 8 9 10 11 12
const checkLoggedIn = (ctx, next) => {
    if (!ctx.state.user) {
      //debug
      console.log('checkLoggedin error');
      ctx.status = 401;
      return;
    }
    return next();
  };
  module.exports = checkLoggedIn;