cumstorm/src/updateGJUserScore.ts

12 lines
508 B
TypeScript

export{}; // fuck you ts, i have to do this to prevent "cannot redeclare block scoped variable"
const handleRequestsAt = ['updateGJUserScore22', 'updateGJUserScore21', 'updateGJUserScore20', 'updateGJUserScore19', 'updateGJUserScore'];
module.exports = (app): void => {
let updateUserScore = async (req, res) => {
res.status(200).send('0'); // temporary
};
for (let i in handleRequestsAt)
app.post('/' + app.get('config').addtopath + 'database/' + handleRequestsAt[i] + '.php', updateUserScore);
};