Check name existence before proceeding to issue certificate

pull/10755/head
Daphne 2016-09-15 18:24:48 +02:00
parent c9054a260e
commit 5ab86342e6
1 changed files with 13 additions and 0 deletions

View File

@ -231,6 +231,19 @@ export default function certificate(app) {
.subscribe( .subscribe(
(didCertify) => { (didCertify) => {
if (didCertify) { if (didCertify) {
// Check if they have a name set
if (user.name === '') {
return res.status(200).send(
dedent`
We need your name so we can put it on your certificate.
<a href="https://github.com/settings/profile">Add your
name to your GitHub account</a>, then go to your
<a href="https://www.freecodecamp.com/settings">settings
page</a> and click the "update my portfolio from GitHub"
button. Then we can issue your certificate.
`
);
}
return res.status(200).send(true); return res.status(200).send(true);
} }
return res.status(200).send( return res.status(200).send(