diff --git a/form/auth_api.js b/form/auth_api.js new file mode 100644 index 0000000..0af2b6f --- /dev/null +++ b/form/auth_api.js @@ -0,0 +1,9 @@ +import Route from "../route.js"; +import auth from "../form/auth.js"; + +let main = new Route([auth], async function (req, res, input) { + let { username, valid } = input; + res.send({ username, valid }); +}); + +export default main; \ No newline at end of file diff --git a/routes.js b/routes.js index 23366d4..491a659 100644 --- a/routes.js +++ b/routes.js @@ -12,6 +12,7 @@ import uploadB from "./form/upload.js"; import commentB from "./form/comment.js"; import settingsB from "./form/settings.js"; import auth from "./form/auth.js"; +import auth_api from "./form/auth_api.js"; import follow from './form/follow.js'; const routes = { @@ -40,7 +41,8 @@ routes.form = { auth, comment: commentB, follow, - settings: settingsB + settings: settingsB, + auth_api }; async function iterate(req, res, index) {