mirror of
https://github.com/github/codeql.git
synced 2025-12-17 17:23:36 +01:00
17 lines
304 B
JavaScript
17 lines
304 B
JavaScript
var express = require('express');
|
|
var app = express();
|
|
|
|
var actions = {
|
|
play(data) {
|
|
// ...
|
|
},
|
|
pause(data) {
|
|
// ...
|
|
}
|
|
}
|
|
|
|
app.get('/perform/:action/:payload', function(req, res) {
|
|
let action = actions[req.params.action]; // $ Source
|
|
res.end(action(req.params.payload)); // $ Alert
|
|
});
|