32
.github/ISSUE_TEMPLATE.md
vendored
32
.github/ISSUE_TEMPLATE.md
vendored
@ -1,22 +1,34 @@
|
|||||||
#### FreeCodeCamp Issue template
|
<!--
|
||||||
To Use this Template:
|
FreeCodeCamp Issue Template
|
||||||
* Fill out what you can
|
NOTE: ISSUES ARE NOT FOR CODE HELP - Ask for Help at
|
||||||
* Delete what you do not fill out
|
https://gitter.im/FreeCodeCamp/Help
|
||||||
|
-->
|
||||||
|
|
||||||
|
#### Challenge Name
|
||||||
|
|
||||||
|
<!-- Insert link to challenge below -->
|
||||||
|
|
||||||
NOTE: ISSUES ARE NOT FOR CODE HELP - Ask for Help at https://gitter.im/FreeCodeCamp/Help
|
|
||||||
|
|
||||||
#### Issue Description
|
#### Issue Description
|
||||||
* When Issue Happens
|
|
||||||
* Steps To Reproduce
|
<!-- Describe below when the issue happens and how to reproduce it -->
|
||||||
|
|
||||||
|
|
||||||
#### Browser Information
|
#### Browser Information
|
||||||
* Browser Name, Version
|
|
||||||
* Operating System
|
<!-- Describe your workspace in which you are having issues-->
|
||||||
|
|
||||||
|
* Browser Name, Version:
|
||||||
|
* Operating System:
|
||||||
|
* Mobile, Desktop, or Tablet:
|
||||||
|
|
||||||
#### Your Code
|
#### Your Code
|
||||||
|
|
||||||
```js
|
```js
|
||||||
If relevant, paste all of your challenge code in here
|
// If relevant, paste all of your challenge code in here
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Screenshot
|
#### Screenshot
|
||||||
|
|
||||||
|
|
||||||
|
@ -104,11 +104,19 @@ export default function migrateCompletedChallenges() {
|
|||||||
if (!user || user.isChallengeMapMigrated) {
|
if (!user || user.isChallengeMapMigrated) {
|
||||||
return next();
|
return next();
|
||||||
}
|
}
|
||||||
|
const id = user.id.toString();
|
||||||
|
return User.findOne$({
|
||||||
|
where: { id },
|
||||||
|
fields: { completedChallenges: true }
|
||||||
|
})
|
||||||
|
.map(({ completedChallenges = [] } = {}) => completedChallenges)
|
||||||
|
.flatMap(completedChallenges => {
|
||||||
return buildChallengeMap(
|
return buildChallengeMap(
|
||||||
user.id.toString(),
|
id,
|
||||||
user.completedChallenges,
|
completedChallenges,
|
||||||
User
|
User
|
||||||
)
|
);
|
||||||
|
})
|
||||||
.subscribe(
|
.subscribe(
|
||||||
count => log('documents update', count),
|
count => log('documents update', count),
|
||||||
// errors go here
|
// errors go here
|
||||||
|
Reference in New Issue
Block a user