mirror of
https://github.com/terribleplan/next.js.git
synced 2024-01-19 02:48:18 +00:00
80cb91ec87
* extract request login from auth * add clarification that the monorepo is for deploy in Now only and fix typo * Refactor HOC - add authorization to HOC - add displayName to HOC - remove unnecessary `run`s in local routing
21 lines
390 B
JavaScript
21 lines
390 B
JavaScript
const { send } = require('micro')
|
|
const login = require('./login')
|
|
const profile = require('./profile')
|
|
|
|
const dev = async (req, res) => {
|
|
switch (req.url) {
|
|
case '/api/profile.js':
|
|
await profile(req, res)
|
|
break
|
|
case '/api/login.js':
|
|
await login(req, res)
|
|
break
|
|
|
|
default:
|
|
send(res, 404, '404. Not found.')
|
|
break
|
|
}
|
|
}
|
|
|
|
module.exports = dev
|