Skip to content

Commit

Permalink
Merge pull request #38 from USB-CI3715/fix-linter
Browse files Browse the repository at this point in the history
se arreglaron los problemas de linter
  • Loading branch information
JoseAlfonzo99 authored Nov 14, 2024
2 parents 8bbe975 + 913c1d7 commit b44f272
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion public/src/client/register.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ define('forum/register', [
const password_confirm = $('#password-confirm');
const register = $('#register');

showSuccess(isProfessor)
showSuccess(isProfessor);
handleLanguageOverride();

$('#content #noscript').val('false');
Expand Down
2 changes: 1 addition & 1 deletion src/posts/create.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ module.exports = function (Posts) {
const content = data.content.toString();
const timestamp = data.timestamp || Date.now();
const isMain = data.isMain || false;
let isUrgent = Boolean(data.isUrgent) || false;
const isUrgent = Boolean(data.isUrgent) || false;

if (!uid && parseInt(uid, 10) !== 0) {
throw new Error('[[error:invalid-uid]]');
Expand Down
2 changes: 1 addition & 1 deletion src/topics/create.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ module.exports = function (Topics) {
user.notifications.sendTopicNotificationToFollowers(uid, topicData, postData);
Topics.notifyTagFollowers(postData, uid);
categories.notifyCategoryFollowers(postData, uid);
}
}

return {
topicData: topicData,
Expand Down
3 changes: 1 addition & 2 deletions src/user/create.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ module.exports = function (User) {
}

async function create(data) {

const timestamp = data.timestamp || Date.now();

let userData = {
Expand All @@ -50,7 +49,7 @@ module.exports = function (User) {
joindate: timestamp,
lastonline: timestamp,
status: 'online',
isProfessor: data.isProfessor == 'on'
isProfessor: data.isProfessor === 'on',
};
['picture', 'fullname', 'location', 'birthday'].forEach((field) => {
if (data[field]) {
Expand Down
10 changes: 5 additions & 5 deletions test/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -251,21 +251,21 @@ describe('API', async () => {
cid: testCategory.cid,
title: 'Test Topic',
content: 'Test topic content',
isUrgent: false
isUrgent: false,
});
const unprivTopic = await topics.post({
uid: unprivUid,
cid: testCategory.cid,
title: 'Test Topic 2',
content: 'Test topic 2 content',
isUrgent: false
isUrgent: false,
});
await topics.post({
uid: unprivUid,
cid: testCategory.cid,
title: 'Test Topic 3',
content: 'Test topic 3 content',
isUrgent: true
isUrgent: true,
});

// Create a post diff
Expand Down Expand Up @@ -633,9 +633,9 @@ describe('API', async () => {
assert.strictEqual(typeof response[prop], 'string', `"${prop}" was expected to be a string, but was ${typeof response[prop]} instead (path: ${method} ${path}, context: ${context})`);
break;
case 'boolean':
if (response[prop] === "true") {
if (response[prop] === 'true') {
response[prop] = true;
} else if (response[prop] === "false") {
} else if (response[prop] === 'false') {
response[prop] = false;
}
assert.strictEqual(typeof response[prop], 'boolean', `"${prop}" was expected to be a boolean, but was ${typeof response[prop]} instead (path: ${method} ${path}, context: ${context})`);
Expand Down

0 comments on commit b44f272

Please sign in to comment.