How to use the http-status.SEE_OTHER function in http-status

To help you get started, we’ve selected a few http-status examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github bookbrainz / bookbrainz-site / src / server / routes / auth.js View on Github external
router.get('/logout', (req, res) => {
	req.logOut();
	res.redirect(status.SEE_OTHER, '/');
});
github bookbrainz / bookbrainz-site / src / server / helpers / auth.js View on Github external
export function isAuthenticated(req, res, next) {
	if (req.isAuthenticated()) {
		return next();
	}

	req.session.redirectTo = req.originalUrl;

	return res.redirect(status.SEE_OTHER, '/auth');
}
github bookbrainz / bookbrainz-site / src / server / routes / entity / publisher.js View on Github external
.then(() => {
			res.redirect(status.SEE_OTHER, `/publisher/${publisher.bbid}`);
		});
});
github bookbrainz / bookbrainz-site / src / server / routes / message.js View on Github external
.then(() => {
			res.redirect(status.SEE_OTHER, '/message/sent');
		});
});
github bookbrainz / bookbrainz-site / src / server / routes / login.js View on Github external
router.get('/logout', (req, res) => {
	req.logOut();
	res.redirect(status.SEE_OTHER, '/');
});