fix already approved org application
Build Images and Deploy / Update-PROD-Stack (push) Successful in 29s
Build Images and Deploy / Update-PROD-Stack (push) Successful in 29s
This commit is contained in:
+2
-3
@@ -161,11 +161,10 @@ router.post('/player/:username/display-name', requireAuth, (req, res) => {
|
||||
router.get('/apply-organizer', requireAuth, (req, res) => {
|
||||
const user = Users.findById(req.session.userId);
|
||||
if (user.is_organizer || user.is_admin) {
|
||||
req.session.flash = { type: 'info', message: 'You already have organizer access.' };
|
||||
return res.redirect(`/player/${user.username}`);
|
||||
return res.render('apply-organizer', { title: 'Organizer Access', pendingApplication: null, alreadyOrganizer: true });
|
||||
}
|
||||
const pendingApplication = OrganizerApplications.findByUser(user.id);
|
||||
res.render('apply-organizer', { title: 'Apply to Become an Organizer', pendingApplication });
|
||||
res.render('apply-organizer', { title: 'Apply to Become an Organizer', pendingApplication, alreadyOrganizer: false });
|
||||
});
|
||||
|
||||
router.post('/apply-organizer', requireAuth, (req, res) => {
|
||||
|
||||
Reference in New Issue
Block a user