Skip to content
Permalink
Browse files

trim

  • Loading branch information
Alex
Alex committed Apr 16, 2019
1 parent 2d5476e commit 3a09f6d36d62a01eadcf68a128d0472b0aa35432
Showing with 3 additions and 6 deletions.
  1. +2 −2 imports/api/votes/methods.js
  2. +1 −4 ncmanifest.json
@@ -18,8 +18,8 @@ Meteor.methods({
throw new Meteor.Error('incomplete-data', 'Nickname field was empty');
} else {
//sanitize
userData.nickname = userData.nickname.replace(/<(?:.|\n)*?>/gm, '');
userSlug = userData.nickname.toLowerCase().replace(/ /g, '-').replace(/[^\w-]+/g, '');
userData.nickname = userData.nickname.trim().replace(/<(?:.|\n)*?>/gm, '');
userSlug = userData.nickname.trim().toLowerCase().replace(/ /g, '-').replace(/[^\w-]+/g, '');

//check if already exists
existingSlugs = Votes.find({ slug: userSlug }).count();
@@ -2,12 +2,9 @@
"name": "whodieswhen",
"env": {
"ROOT_URL": "https://three-eyed-bingo.com",
"KADIRA_APP_ID": "YvuCKm2XvfkiThegy",
"KADIRA_APP_SECRET": "4b21a4f4-5fc5-4403-88dc-eb4ce8aba180",
"KADIRA_OPTIONS_ENDPOINT": "https://meteor-apm-engine.nodechef.com",
"METEOR_SETTINGS": {}
},
"meteorbuild": {
"server": "https://three-eyed-bingo.com"
}
}
}

0 comments on commit 3a09f6d

Please sign in to comment.
You can’t perform that action at this time.