Created
December 11, 2017 10:55
-
-
Save iamkevingreen/aa63954017eeca7e2a6151303fed9b5f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { json } = require('micro') | |
const post = require('micro-post') | |
const updateBlog = require('./api/blog') | |
module.exports = post(async (req, res) => { | |
const parsed = await json(req) | |
switch (parsed.sys.contentType.sys.id) { | |
case 'blog': | |
updateBlog(parsed) | |
break | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment