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