13 lines
432 B
JavaScript

import { login_view, whoami_view, refresh_token_view, signup_view, account_info_view } from './views.mjs';
import Router from 'koa-router';
const routes = new Router();
routes.post('/auth/login', ...login_view);
routes.post('/auth/signup', ...signup_view);
routes.post('/auth/whoami', ...whoami_view);
routes.post('/auth/refresh', ...refresh_token_view);
routes.get('/account/:uid', ...account_info_view);
export default routes;