Refactor
This commit is contained in:
13
server/api/user.js
Normal file
13
server/api/user.js
Normal file
@ -0,0 +1,13 @@
|
||||
import Router from 'koa-router';
|
||||
|
||||
import auth from './authentication';
|
||||
import { presentUser } from '../presenters';
|
||||
import { User } from '../models';
|
||||
|
||||
const router = new Router();
|
||||
|
||||
router.post('user.info', auth(), async (ctx) => {
|
||||
ctx.body = { data: presentUser(ctx.state.user) };
|
||||
});
|
||||
|
||||
export default router;
|
Reference in New Issue
Block a user