add credits/index.js
This commit is contained in:
parent
c49cd95a98
commit
3e9b57c145
2 changed files with 21 additions and 0 deletions
20
credits/index.js
Normal file
20
credits/index.js
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
|
||||||
|
const express = require('express')
|
||||||
|
const router = express.Router()
|
||||||
|
|
||||||
|
// The following endpoints are supported.
|
||||||
|
//
|
||||||
|
// /update - json fields: userid, column, and mods
|
||||||
|
|
||||||
|
router.post('/update', (req, res) => {
|
||||||
|
console.log('in update, body:', req.body)
|
||||||
|
let respbuf = ''
|
||||||
|
res.send(respbuf)
|
||||||
|
})
|
||||||
|
|
||||||
|
router.use((req, res, next) => {
|
||||||
|
console.log('nothing to do for %s %s', req.method, req.url)
|
||||||
|
res.status(404).end()
|
||||||
|
})
|
||||||
|
|
||||||
|
module.exports = router
|
1
index.js
1
index.js
|
@ -8,6 +8,7 @@ app.use(express.json());
|
||||||
// connect the plugin(s)
|
// connect the plugin(s)
|
||||||
app.use('/plugin', require('./plugin'))
|
app.use('/plugin', require('./plugin'))
|
||||||
app.use('/plugin2', require('./plugin2'))
|
app.use('/plugin2', require('./plugin2'))
|
||||||
|
app.use('/credits', require('./credits'))
|
||||||
|
|
||||||
// catch 404 and forward to error handler
|
// catch 404 and forward to error handler
|
||||||
const createError = require('http-errors')
|
const createError = require('http-errors')
|
||||||
|
|
Loading…
Add table
Reference in a new issue