Skip to content

Commit

Permalink
added comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Sarim Faraz committed Sep 3, 2024
1 parent db8300a commit 22a7c58
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/user/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,13 +102,14 @@ module.exports = function (User) {
}
}

// Dummy comment to trigger SC
// Co-pilot assisted code
function validateLanguage(value, languageCodes) {
if (value && !languageCodes.includes(value)) {
throw new Error('[[error:invalid-language]]');
}
}

// Co-pilot assisted code
User.saveSettings = async function (uid, data) {
const maxPostsPerPage = meta.config.maxPostsPerPage || 20;
validatePaginationValue(data.postsPerPage, maxPostsPerPage);
Expand Down

0 comments on commit 22a7c58

Please sign in to comment.