Skip to content

Commit

Permalink
refactor: readonly
Browse files Browse the repository at this point in the history
  • Loading branch information
mlajkim committed Nov 20, 2024
1 parent c10ac90 commit 6236c0a
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 20 deletions.
4 changes: 2 additions & 2 deletions src/controllers/shared-resource.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ export class SharedResourceController {
private readonly jwtService: JwtService,
private readonly sharedResourceService: SharedResourceService,
@InjectModel(SharedResourceProps.name)
private sharedResourceModel: SharedResourceModel,
private readonly sharedResourceModel: SharedResourceModel,
@InjectModel(WordProps.name)
private wordModel: WordModel,
private readonly wordModel: WordModel,
) {}

@Post(SharedResourceControllerPath.PostSharedResource)
Expand Down
8 changes: 4 additions & 4 deletions src/services/action-group.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ import { ArchiveDomain } from '@/domains/archive/archive.domain'
export class ActionGroupService {
constructor(
@InjectModel(ActionGroupProps.name)
private actionGroupModel: ActionGroupModel,
private readonly actionGroupModel: ActionGroupModel,
@InjectModel(ArchiveProps.name)
private archiveModel: ArchiveModel,
private readonly archiveModel: ArchiveModel,
@InjectModel(ActionProps.name)
private actionModel: ActionModel,
private wordService: WordService,
private readonly actionModel: ActionModel,
private readonly wordService: WordService,
) {}

async post(
Expand Down
6 changes: 3 additions & 3 deletions src/services/ritual.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ import { ArchiveModel, ArchiveProps } from '@/schemas/archive.schema'
export class RitualService {
constructor(
@InjectModel(RitualProps.name)
private ritualModel: RitualModel,
private readonly ritualModel: RitualModel,
@InjectModel(ActionGroupProps.name)
private actionGroupModel: ActionGroupModel,
private readonly actionGroupModel: ActionGroupModel,
@InjectModel(ArchiveProps.name)
private archiveModel: ArchiveModel,
private readonly archiveModel: ArchiveModel,
) {}

/**
Expand Down
6 changes: 3 additions & 3 deletions src/services/semester.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ import { WordChunkDomain } from '@/domains/word/word-chunk.domain'
export class SemesterService {
constructor(
@InjectModel(WordProps.name)
private wordModel: WordModel,
private readonly wordModel: WordModel,
@InjectModel(SupportProps.name)
private supportModel: SupportModel,
private getWordQueryFactory: GetWordQueryFactory,
private readonly supportModel: SupportModel,
private readonly getWordQueryFactory: GetWordQueryFactory,
) {}

async getSemesters(atd: AccessTokenDomain): Promise<SemesterChunkDomain> {
Expand Down
4 changes: 2 additions & 2 deletions src/services/shared-resource.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ import { NotExistOrNoPermissionError } from '@/errors/404/not-exist-or-no-permis
export class SharedResourceService {
constructor(
@InjectModel(SharedResourceProps.name)
private sharedResourceModel: SharedResourceModel,
private wordService: WordService,
private readonly sharedResourceModel: SharedResourceModel,
private readonly wordService: WordService,
) {}

async post(
Expand Down
2 changes: 1 addition & 1 deletion src/services/user.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { InjectModel } from '@nestjs/mongoose'
export class UserService {
constructor(
@InjectModel(UserProps.name)
private userModel: UserModel,
private readonly userModel: UserModel,
) {}

// TODO: Should return domain, but for now, simplicity.
Expand Down
10 changes: 5 additions & 5 deletions src/services/word.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ import { InjectModel } from '@nestjs/mongoose'
export class WordService {
constructor(
@InjectModel(WordProps.name)
private wordModel: WordModel,
private readonly wordModel: WordModel,
@InjectModel(SupportProps.name)
private supportModel: SupportModel,
private readonly supportModel: SupportModel,
@InjectModel(PreferenceProps.name)
private preferenceModel: PreferenceModel,
private termToExamplePrompt: TermToExamplePrompt,
private getWordQueryFactory: GetWordQueryFactory,
private readonly preferenceModel: PreferenceModel,
private readonly termToExamplePrompt: TermToExamplePrompt,
private readonly getWordQueryFactory: GetWordQueryFactory,
private readonly logger: Logger,
) {}

Expand Down

0 comments on commit 6236c0a

Please sign in to comment.