1
0
Fork 0
mirror of https://github.com/plankanban/planka.git synced 2025-07-24 15:49:46 +02:00

Add email and password change functionality for a current user, remove deep compare hooks

This commit is contained in:
Maksim Eltyshev 2019-10-18 08:06:34 +05:00
parent e564729598
commit 2566ff376e
67 changed files with 1232 additions and 267 deletions

View file

@ -0,0 +1,36 @@
/**
* forbidden.js
*
* A custom response.
*
* Example usage:
* ```
* return res.forbidden();
* // -or-
* return res.forbidden(optionalData);
* ```
*
* Or with actions2:
* ```
* exits: {
* somethingHappened: {
* responseType: 'forbidden'
* }
* }
* ```
*
* ```
* throw 'somethingHappened';
* // -or-
* throw { somethingHappened: optionalData }
* ```
*/
module.exports = function forbidden(message) {
const { res } = this;
return res.status(403).json({
code: 'E_FORBIDDEN',
message
});
};