mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-07-22 03:34:14 +00:00
17 lines
433 B
JavaScript
17 lines
433 B
JavaScript
const api = {};
|
|
|
|
api.redirectProfileQRCode = {
|
|
method: 'GET',
|
|
url: '/qr-code/user/:memberid',
|
|
runCron: false,
|
|
async handler (req, res) {
|
|
req.checkParams('memberid', res.t('memberIdRequired')).notEmpty().isUUID();
|
|
|
|
const validationErrors = req.validationErrors();
|
|
if (validationErrors) throw validationErrors;
|
|
|
|
res.redirect(301, `/static/front/#?memberId=${req.params.memberid}`);
|
|
},
|
|
};
|
|
|
|
export default api;
|