Skip to content

Commit

Permalink
Merge pull request #151 from REAN-Foundation/eslint_fix
Browse files Browse the repository at this point in the history
Fixed eslint errors
  • Loading branch information
vinay-debug authored Jul 29, 2024
2 parents 41dfbc4 + b735814 commit 09e76d7
Show file tree
Hide file tree
Showing 26 changed files with 33 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,10 @@ export class ParticipantControllerDelegate {
if (lastUpdatedByUserId != null) {
filters['LastUpdatedByUserId'] = lastUpdatedByUserId;
}
var phone = query.phone ? query.phone : null;
if (phone != null) {
filters['Phone'] = phone;
}
return filters;
};

Expand Down
4 changes: 2 additions & 2 deletions src/api/user/user.controller.delegate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,8 @@ export class UserControllerDelegate {

sendOtp = async (requestBody) => {
await validator.validateSendOtpRequest(requestBody);
const countryCode = (typeof requestBody.CountryCode !== undefined) ? requestBody.CountryCode : '+91';
const phone = (typeof requestBody.Phone !== undefined) ? requestBody.Phone : null;
const countryCode = (requestBody.CountryCode) ? requestBody.CountryCode : '+91';
const phone = (requestBody.Phone) ? requestBody.Phone : null;
const user = await this._service.getUser(countryCode, phone, null, null);
if (user === null) {
ErrorHandler.throwNotFoundError('User does not exist!');
Expand Down
4 changes: 2 additions & 2 deletions src/common/helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -325,14 +325,14 @@ export class Helper {
};

static checkStr(val: any) {
if (typeof val === null || typeof val === undefined || typeof val !== 'string') {
if (val === null || val === undefined || typeof val !== 'string') {
return null;
}
return val;
}

static isStr(val: any): boolean {
if (typeof val === null || typeof val === undefined || typeof val !== 'string') {
if (val === null || val === undefined || typeof val !== 'string') {
return false;
}
return true;
Expand Down
2 changes: 1 addition & 1 deletion src/database/models/api.client.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export class ApiClientModel {
tableName : ApiClientModel.TableName,
});

static associate = (models) => {
static associate = () => {
//Add associations here...

// models.ApiClient.belongsTo(models.User, {
Expand Down
2 changes: 1 addition & 1 deletion src/database/models/assets/action.plan.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export class ActionPlanModel {
tableName : ActionPlanModel.TableName,
});

static associate = (models) => {
static associate = () => {

//Add associations here...

Expand Down
2 changes: 1 addition & 1 deletion src/database/models/assets/appointment.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export class AppointmentModel {
tableName : AppointmentModel.TableName,
});

static associate = (models) => {
static associate = () => {

//Add associations here...

Expand Down
2 changes: 1 addition & 1 deletion src/database/models/assets/assessment.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export class AssessmentModel {
tableName : AssessmentModel.TableName,
});

static associate = (models) => {
static associate = () => {

//Add associations here...

Expand Down
2 changes: 1 addition & 1 deletion src/database/models/assets/biometrics.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export class BiometricsModel {
tableName : BiometricsModel.TableName,
});

static associate = (models) => {
static associate = () => {

//Add associations here...

Expand Down
2 changes: 1 addition & 1 deletion src/database/models/assets/challenge.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export class ChallengeModel {
tableName : ChallengeModel.TableName,
});

static associate = (models) => {
static associate = () => {

//Add associations here...

Expand Down
2 changes: 1 addition & 1 deletion src/database/models/assets/checkup.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export class CheckupModel {
tableName : CheckupModel.TableName,
});

static associate = (models) => {
static associate = () => {

//Add associations here...

Expand Down
2 changes: 1 addition & 1 deletion src/database/models/assets/consultation.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export class ConsultationModel {
tableName : ConsultationModel.TableName,
});

static associate = (models) => {
static associate = () => {

//Add associations here...

Expand Down
2 changes: 1 addition & 1 deletion src/database/models/assets/exercise.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export class ExerciseModel {
tableName : ExerciseModel.TableName,
});

static associate = (models) => {
static associate = () => {

//Add associations here...

Expand Down
2 changes: 1 addition & 1 deletion src/database/models/assets/goal.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export class GoalModel {
tableName : GoalModel.TableName,
});

static associate = (models) => {
static associate = () => {

//Add associations here...

Expand Down
2 changes: 1 addition & 1 deletion src/database/models/assets/medication.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export class MedicationModel {
tableName : MedicationModel.TableName,
});

static associate = (models) => {
static associate = () => {

//Add associations here...

Expand Down
2 changes: 1 addition & 1 deletion src/database/models/assets/meditation.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export class MeditationModel {
tableName : MeditationModel.TableName,
});

static associate = (models) => {
static associate = () => {

//Add associations here...

Expand Down
2 changes: 1 addition & 1 deletion src/database/models/assets/message.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ export class MessageModel {
tableName : MessageModel.TableName,
});

static associate = (models) => {
static associate = () => {

//Add associations here...

Expand Down
2 changes: 1 addition & 1 deletion src/database/models/assets/nutrition.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export class NutritionModel {
tableName : NutritionModel.TableName,
});

static associate = (models) => {
static associate = () => {

//Add associations here...

Expand Down
2 changes: 1 addition & 1 deletion src/database/models/assets/priority.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export class PriorityModel {
tableName : PriorityModel.TableName,
});

static associate = (models) => {
static associate = () => {

//Add associations here...

Expand Down
2 changes: 1 addition & 1 deletion src/database/models/assets/reflection.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export class ReflectionModel {
tableName : ReflectionModel.TableName,
});

static associate = (models) => {
static associate = () => {

//Add associations here...

Expand Down
2 changes: 1 addition & 1 deletion src/database/models/assets/reminder.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export class ReminderModel {
tableName : ReminderModel.TableName,
});

static associate = (models) => {
static associate = () => {

//Add associations here...

Expand Down
2 changes: 1 addition & 1 deletion src/database/models/assets/web.link.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export class WebLinkModel {
tableName : WebLinkModel.TableName,
});

static associate = (models) => {
static associate = () => {

//Add associations here...

Expand Down
2 changes: 1 addition & 1 deletion src/database/models/assets/web.newsfeed.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export class WebNewsfeedModel {
tableName : WebNewsfeedModel.TableName,
});

static associate = (models) => {
static associate = () => {

//Add associations here...

Expand Down
2 changes: 1 addition & 1 deletion src/database/models/assets/word.power.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ export class WordPowerModel {
tableName : WordPowerModel.TableName,
});

static associate = (models) => {
static associate = () => {

//Add associations here...

Expand Down
2 changes: 1 addition & 1 deletion src/database/models/careplan/careplan.category.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export class CareplanCategoryModel {
tableName : CareplanCategoryModel.TableName,
});

static associate = (models) => {
static associate = () => {
//Add associations here...
};

Expand Down
2 changes: 1 addition & 1 deletion src/database/models/enrollment/participant.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export class ParticipantModel {
tableName : ParticipantModel.TableName,
});

static associate = (models) => {
static associate = () => {
//Add associations here...

};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ export class ParticipantService {
[Op.like] : '%' + filters.Country + '%'
};
}
if (filters.Phone) {
search.where['Phone'] = filters.Phone;
}

//Sorting
let orderByColumn = 'CreatedAt';
Expand Down

0 comments on commit 09e76d7

Please sign in to comment.