Merge pull request #3791 from bluewave-labs/chore/fix-access-modifier
chore: protected -> private as no class inherits
This commit is contained in:
8 files changed
+10
-10
No files matched your search
@@ -5,7 +5,7 @@ import { AppSettingsModel, type AppSettingsDocument } from "@/domain/app-setting
|
|||||||
import { toStringId, toDateString } from "@/utils/mongoMappers.js";
|
import { toStringId, toDateString } from "@/utils/mongoMappers.js";
|
||||||
|
|
||||||
class MongoSettingsRepository implements ISettingsRepository {
|
class MongoSettingsRepository implements ISettingsRepository {
|
||||||
protected toEntity = (doc: AppSettingsDocument): Settings => {
|
private toEntity = (doc: AppSettingsDocument): Settings => {
|
||||||
return {
|
return {
|
||||||
id: toStringId(doc._id),
|
id: toStringId(doc._id),
|
||||||
checkTTL: doc.checkTTL,
|
checkTTL: doc.checkTTL,
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import mongoose from "mongoose";
|
|||||||
import { AppError } from "@/utils/AppError.js";
|
import { AppError } from "@/utils/AppError.js";
|
||||||
import { toStringId, toDateString } from "@/utils/mongoMappers.js";
|
import { toStringId, toDateString } from "@/utils/mongoMappers.js";
|
||||||
class MongoDLQRepository implements IDLQRepository {
|
class MongoDLQRepository implements IDLQRepository {
|
||||||
protected toEntity = (doc: DLQItemDocument): DLQItem => {
|
private toEntity = (doc: DLQItemDocument): DLQItem => {
|
||||||
return {
|
return {
|
||||||
id: toStringId(doc._id),
|
id: toStringId(doc._id),
|
||||||
type: doc.type,
|
type: doc.type,
|
||||||
@@ -23,7 +23,7 @@ class MongoDLQRepository implements IDLQRepository {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
protected mapDocuments = (documents: DLQItemDocument[] | DLQItemDocument | null): DLQItem[] => {
|
private mapDocuments = (documents: DLQItemDocument[]) => {
|
||||||
if (!documents) {
|
if (!documents) {
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ class MongoIncidentsRepository implements IIncidentsRepository {
|
|||||||
return matchStage;
|
return matchStage;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected toEntity = (doc: IncidentDocument): Incident => {
|
private toEntity = (doc: IncidentDocument): Incident => {
|
||||||
return {
|
return {
|
||||||
id: toStringId(doc._id),
|
id: toStringId(doc._id),
|
||||||
monitorId: toStringId(doc.monitorId),
|
monitorId: toStringId(doc.monitorId),
|
||||||
@@ -52,7 +52,7 @@ class MongoIncidentsRepository implements IIncidentsRepository {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
protected mapDocuments = (documents: IncidentDocument[] | IncidentDocument | null): Incident[] => {
|
private mapDocuments = (documents: IncidentDocument[]): Incident[] => {
|
||||||
if (!documents) {
|
if (!documents) {
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import crypto from "crypto";
|
|||||||
import { toStringId, toDateString } from "@/utils/mongoMappers.js";
|
import { toStringId, toDateString } from "@/utils/mongoMappers.js";
|
||||||
|
|
||||||
class MongoInvitesRepository implements IInvitesRepository {
|
class MongoInvitesRepository implements IInvitesRepository {
|
||||||
protected toEntity = (doc: InviteDocument): Invite => {
|
private toEntity = (doc: InviteDocument): Invite => {
|
||||||
return {
|
return {
|
||||||
id: toStringId(doc._id),
|
id: toStringId(doc._id),
|
||||||
email: doc.email,
|
email: doc.email,
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ const SERVICE_NAME = "MongoQueueWorkersRepository";
|
|||||||
class MongoQueueWorkersRepository implements IQueueWorkersRepository {
|
class MongoQueueWorkersRepository implements IQueueWorkersRepository {
|
||||||
static SERVICE_NAME = SERVICE_NAME;
|
static SERVICE_NAME = SERVICE_NAME;
|
||||||
|
|
||||||
protected toEntity = (doc: QueueWorkerDocument): QueueWorker => {
|
private toEntity = (doc: QueueWorkerDocument): QueueWorker => {
|
||||||
return {
|
return {
|
||||||
workerId: doc._id,
|
workerId: doc._id,
|
||||||
mode: doc.mode,
|
mode: doc.mode,
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ const SERVICE_NAME = "MongoRecoveryTokensRepository";
|
|||||||
class MongoRecoveryTokensRepository implements IRecoveryTokensRepository {
|
class MongoRecoveryTokensRepository implements IRecoveryTokensRepository {
|
||||||
static SERVICE_NAME = SERVICE_NAME;
|
static SERVICE_NAME = SERVICE_NAME;
|
||||||
|
|
||||||
protected toEntity = (doc: RecoveryTokenDocument): RecoveryToken => {
|
private toEntity = (doc: RecoveryTokenDocument): RecoveryToken => {
|
||||||
return {
|
return {
|
||||||
id: toStringId(doc._id),
|
id: toStringId(doc._id),
|
||||||
email: doc.email,
|
email: doc.email,
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ const SERVICE_NAME = "TagsRepository";
|
|||||||
class MongoTagsRepository implements ITagsRepository {
|
class MongoTagsRepository implements ITagsRepository {
|
||||||
static SERVICE_NAME = SERVICE_NAME;
|
static SERVICE_NAME = SERVICE_NAME;
|
||||||
|
|
||||||
protected toEntity = (doc: TagDocument): Tag => {
|
private toEntity = (doc: TagDocument): Tag => {
|
||||||
return {
|
return {
|
||||||
id: toStringId(doc._id),
|
id: toStringId(doc._id),
|
||||||
teamId: toStringId(doc.teamId),
|
teamId: toStringId(doc.teamId),
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ class MongoUsersRepository implements IUsersRepository {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
protected toEntity = (doc: UserDocument): User => {
|
private toEntity = (doc: UserDocument): User => {
|
||||||
return {
|
return {
|
||||||
id: toStringId(doc._id),
|
id: toStringId(doc._id),
|
||||||
firstName: doc.firstName,
|
firstName: doc.firstName,
|
||||||
|
|||||||
Reference in new issue
Block a user