Merge branch 'staging' of github.com:FreeCodeCamp/freecodecamp into staging
commit
bc163bef38
|
@ -7,7 +7,7 @@ import { saveUser, observeMethod } from '../../server/utils/rx';
|
|||
import { blacklistedUsernames } from '../../server/utils/constants';
|
||||
|
||||
const debug = debugFactory('freecc:user:remote');
|
||||
const BROWNIEPOINTS_TIMEOUT = [30, 'seconds'];
|
||||
const BROWNIEPOINTS_TIMEOUT = [1, 'hour'];
|
||||
|
||||
function getAboutProfile({
|
||||
username,
|
||||
|
@ -35,6 +35,11 @@ module.exports = function(User) {
|
|||
delete User.validations.email;
|
||||
// set salt factor for passwords
|
||||
User.settings.saltWorkFactor = 5;
|
||||
// set user.rand to random number
|
||||
User.definition.rawProperties.rand.default =
|
||||
User.definition.properties.rand.default = function() {
|
||||
return Math.random();
|
||||
};
|
||||
|
||||
// username should not be in blacklist
|
||||
User.validatesExclusionOf('username', {
|
||||
|
|
|
@ -152,6 +152,10 @@
|
|||
}
|
||||
],
|
||||
"default": []
|
||||
},
|
||||
"rand": {
|
||||
"type": "number",
|
||||
"index": true
|
||||
}
|
||||
},
|
||||
"validations": [],
|
||||
|
|
|
@ -538,7 +538,7 @@
|
|||
"title": "Change the Font Size of an Element",
|
||||
"difficulty": 1.13,
|
||||
"description": [
|
||||
"Create a second <code>p</code> element with the following <code>kitty ipsum text<code>: <code>Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.</code>",
|
||||
"Create a second <code>p</code> element with the following <code>kitty ipsum text</code>: <code>Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.</code>",
|
||||
"Then, inside your <code><style></code> element, set the <code>font-size</code> of all <code>p</code> elements to 16 pixels.",
|
||||
"Font size is controlled by the <code>font-size</code> CSS attribute, like this: <code>h1 { font-size: 30px; }</code>.",
|
||||
"See if you can figure out how to give both of your <code>p</code> elements the font-size of 16 pixels (<code>16px</code>). You can do this inside the same <code><style></code> tag that we created for your <code>red-text</code> class."
|
||||
|
|
|
@ -548,6 +548,7 @@
|
|||
"difficulty": "2.11",
|
||||
"description": [
|
||||
"Find the smallest number that is evenly divisible by all numbers in the provided range.",
|
||||
"In other words, given the range [3,7], you will need to find the least common multiple of 3, 4, 5, 6, and 7.",
|
||||
"The range will be an array of two numbers that will not necessarily be in numerical order.",
|
||||
"Remember to use <a href='//github.com/FreeCodeCamp/freecodecamp/wiki/How-to-get-help-when-you-get-stuck' target='_blank'>Read-Search-Ask</a> if you get stuck. Try to pair program. Write your own code."
|
||||
],
|
||||
|
|
|
@ -124,6 +124,7 @@ var users = dbObservable
|
|||
user[provider + 'id'] = user[provider];
|
||||
user[provider] = null;
|
||||
});
|
||||
user.rand = Math.random();
|
||||
|
||||
return user;
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue