mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-03-10 01:01:16 -04:00
fix: certification to private on private timeline (#45562)
Co-authored-by: Naomi Carrigan <nhcarrigan@gmail.com> Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
This commit is contained in:
@@ -391,7 +391,7 @@ function createShowCert(app) {
|
||||
]
|
||||
});
|
||||
}
|
||||
const { isLocked, showCerts, showName } = user.profileUI;
|
||||
const { isLocked, showCerts, showName, showTimeLine } = user.profileUI;
|
||||
|
||||
if (!user.name) {
|
||||
return res.json({
|
||||
@@ -451,6 +451,18 @@ function createShowCert(app) {
|
||||
});
|
||||
}
|
||||
|
||||
if (!showTimeLine) {
|
||||
return res.json({
|
||||
messages: [
|
||||
{
|
||||
type: 'info',
|
||||
message: 'flash.timeline-private',
|
||||
variables: { username: username }
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
if (user[certType]) {
|
||||
const { completedChallenges = [] } = user;
|
||||
const certChallenge = _.find(
|
||||
|
||||
Reference in New Issue
Block a user