feat: restrict translation to audited certs
This commit is contained in:
committed by
Mrugesh Mohapatra
parent
1ec6cf1efd
commit
b197f73881
15
utils/is-audited.js
Normal file
15
utils/is-audited.js
Normal file
@ -0,0 +1,15 @@
|
||||
// this can go once all certs have been audited.
|
||||
function isAuditedCert(lang, cert) {
|
||||
if (!lang || !cert)
|
||||
throw Error('Both arguments must be provided for auditing');
|
||||
// in order to see the challenges in the client, add the certification that
|
||||
// contains those challenges to this array:
|
||||
const auditedCerts = [
|
||||
'responsive-web-design',
|
||||
'javascript-algorithms-and-data-structures',
|
||||
'certificates'
|
||||
];
|
||||
return lang === 'english' || auditedCerts.includes(cert);
|
||||
}
|
||||
|
||||
exports.isAuditedCert = isAuditedCert;
|
Reference in New Issue
Block a user