-
Notifications
You must be signed in to change notification settings - Fork 8
Frontend requirements + Maintenance mode #25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Frontend requirements + Maintenance mode #25
Conversation
| return tag.topics; | ||
| return tag; | ||
| } catch (err) { | ||
| console.log(err); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
=> code observability
| module.exports = async (req, res, next) => { | ||
| const organization = await Organization.findOne({}).lean(); | ||
| if (organization && organization.isUnderMaintenance) { | ||
| if (req.headers["access-level"] == -1 || (req.currentUser && req.currentUser.isAdmin)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since it is no longer recommended or is a necessity to prefix custom headers with X-; this name will be good to go
| throw new Error(adminAccessError); | ||
| } | ||
| } catch (err) { | ||
| console.log(err); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CO
Related frontend pull request: PR#30