Skip to content

Commit

Permalink
Fixed admin check in dev blog post
Browse files Browse the repository at this point in the history
  • Loading branch information
dekkerglen committed Oct 13, 2019
1 parent a8187d4 commit 2275877
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 13 deletions.
2 changes: 1 addition & 1 deletion routes/dev_routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ router.get('/blog/:id', function(req, res) {

router.post('/blogpost', ensureAuth, function(req, res) {
User.findById(req.user._id, function(err, user) {
if (user && user.username == adminname) {
if (user && util.isAdmin(user)) {
var blogpost = new Blog();
blogpost.title = req.body.title;
if (req.body.html && req.body.html.length > 0) {
Expand Down
33 changes: 21 additions & 12 deletions views/info/temp.pug
Original file line number Diff line number Diff line change
@@ -1,20 +1,29 @@
p
a We have another exciting update ready for you today! You may have noticed some downtime tonight, that's because the big feature from this update is short URLs, so we needed to take the server down to update the database.
a I feel I need to apologize for putting out this update late. Last week I was very sick with the flu, and that didn't give me a lot of time to make sure this update was up to quality, so I decided to postpone to now. You may have noticed significantly more downtime during the deployment of this update, and that's because we've switched to an improved, scalable server infrastructure. This will keep everything fast, despite more people trying to access the site. In addition to the infrastructure changes, we have a nice collection of new features to share.
p
a New Features:
p
ul
li Cube IDs are now signfiantly shorter. Almost all cubes will now be 2 digits, but new cubes will be 3 digits
li Custom cube url aliases added
li Persistent Authentication: users will no longer be logged out during crashes or downtime
li Several minor improvements for viewing the site on mobile
li Filtered cubes can now be shared, the filter is now stored in the url
li Page titles are now named after the appropriate cube
li Non-promotional, non-digital cards are now the default version
li 'Top Cards' can now be accessed from About->Top Cards. Cards are rated based on draft data
li 'Feature Cubes' section added to homepage. We will use this section to show off some extra special cubes!
li Cards can now be middle clicked to bring up the TCGPlayer page
li Line breaks are now allowed in blog posts
li Added RSS feeds for cubes. Links can be found underneath the cube image, under cube overview
li Added an API to fetch cube lists. If you're interested in integrating, PM Dekkaru on the Cube Cobra Discord server
li Add CSRF protection. This makes our site more secure against attackers!
p
a Bugfixes:
ul
li Fixed minor UI issues
li Fixed new lines in cube posts
li Bot draft decks style fixed
li Correct metatags for twitter added
li Removed duplicate tag suggestions
li Fixed issue with Listview crashing, related to changing color identity or status
li Fixed issue with advanced filter UI and filtering by status
li Filter syntax is no longer case sensitive
li Fixed tag color display in compare view
li Issue fixed when time stamps are off by on month
li Import from CSV now adds time stamps correctly
li Fixed an issue with automatic blog post titles not being correct
li Adding lands reset correctly now
li Fixed issue with invalid color attributes with a csv import
li Fixed several issues related to updated a group of cards
li CMCs with large values, and fractional values, are now accounted for

0 comments on commit 2275877

Please sign in to comment.