20 lines
502 B
JavaScript
20 lines
502 B
JavaScript
let cfg = require(global['__dirname']+'/bin/config');
|
|
|
|
module.exports = {
|
|
path: "/register",
|
|
/**
|
|
* register a user; currently not implemented
|
|
* @url /register
|
|
* @method POST
|
|
*/
|
|
post: async (req, res) => {
|
|
// if registration is disabled
|
|
if(!cfg.web.registration) {
|
|
return res.type('json').status(400).end(JSON.stringify({status: 400, message: "msg.auth.registration.deactivated"}));
|
|
} else {
|
|
// am i rite?
|
|
return res.type('json').status(200).end(JSON.stringify({}));
|
|
}
|
|
}
|
|
};
|