diff --git a/frontend/api/index.js b/frontend/api/index.js index d4ebef0e..2b273a72 100644 --- a/frontend/api/index.js +++ b/frontend/api/index.js @@ -7,7 +7,9 @@ const projects = require('./routes/projects') const members = require('./routes/members') const users = require('./routes/users') const stats = require('./routes/stats') +const auth = require('./routes/auth') +app.use('/auth', auth) app.use('/users', users) app.use('/projects', projects) app.use('/projects/:project_id/statistics', stats) diff --git a/frontend/api/routes/auth.js b/frontend/api/routes/auth.js new file mode 100644 index 00000000..47873571 --- /dev/null +++ b/frontend/api/routes/auth.js @@ -0,0 +1,11 @@ +const express = require('express') +const router = express.Router() + +// Get a token. +router.get('/api-token-auth', (req, res) => { + res.json({ + token: '9944b09199c62bcf9418ad846dd0e4bbdfc6ee4b' + }) +}) + +module.exports = router