From 2d2ab0ddfd9bc6fd86a098cd9be81805e59a72fc Mon Sep 17 00:00:00 2001 From: iamacook Date: Tue, 30 Jul 2024 17:47:04 +0200 Subject: [PATCH] Move datasource --- .../__tests__/upsert-subscriptions.dto.entity.builder.ts | 2 +- .../notifications/entities/upsert-subscriptions.dto.entity.ts | 0 .../notifications/notifications.datasource.spec.ts | 4 ++-- .../{accounts => }/notifications/notifications.datasource.ts | 2 +- src/domain/interfaces/notifications.datasource.interface.ts | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) rename src/datasources/{accounts => }/notifications/__tests__/upsert-subscriptions.dto.entity.builder.ts (90%) rename src/datasources/{accounts => }/notifications/entities/upsert-subscriptions.dto.entity.ts (100%) rename src/datasources/{accounts => }/notifications/notifications.datasource.spec.ts (98%) rename src/datasources/{accounts => }/notifications/notifications.datasource.ts (98%) diff --git a/src/datasources/accounts/notifications/__tests__/upsert-subscriptions.dto.entity.builder.ts b/src/datasources/notifications/__tests__/upsert-subscriptions.dto.entity.builder.ts similarity index 90% rename from src/datasources/accounts/notifications/__tests__/upsert-subscriptions.dto.entity.builder.ts rename to src/datasources/notifications/__tests__/upsert-subscriptions.dto.entity.builder.ts index efc4c087fa..334d7e8cd1 100644 --- a/src/datasources/accounts/notifications/__tests__/upsert-subscriptions.dto.entity.builder.ts +++ b/src/datasources/notifications/__tests__/upsert-subscriptions.dto.entity.builder.ts @@ -1,7 +1,7 @@ import { faker } from '@faker-js/faker'; import { Builder, IBuilder } from '@/__tests__/builder'; import { getAddress } from 'viem'; -import { UpsertSubscriptionsDto } from '@/datasources/accounts/notifications/entities/upsert-subscriptions.dto.entity'; +import { UpsertSubscriptionsDto } from '@/datasources/notifications/entities/upsert-subscriptions.dto.entity'; import { DeviceType } from '@/domain/notifications/entities-v2/device-type.entity'; import { Uuid } from '@/domain/notifications/entities-v2/uuid.entity'; import { NotificationType } from '@/domain/notifications/entities-v2/notification-type.entity'; diff --git a/src/datasources/accounts/notifications/entities/upsert-subscriptions.dto.entity.ts b/src/datasources/notifications/entities/upsert-subscriptions.dto.entity.ts similarity index 100% rename from src/datasources/accounts/notifications/entities/upsert-subscriptions.dto.entity.ts rename to src/datasources/notifications/entities/upsert-subscriptions.dto.entity.ts diff --git a/src/datasources/accounts/notifications/notifications.datasource.spec.ts b/src/datasources/notifications/notifications.datasource.spec.ts similarity index 98% rename from src/datasources/accounts/notifications/notifications.datasource.spec.ts rename to src/datasources/notifications/notifications.datasource.spec.ts index 5cd480401b..4bcbc751d2 100644 --- a/src/datasources/accounts/notifications/notifications.datasource.spec.ts +++ b/src/datasources/notifications/notifications.datasource.spec.ts @@ -1,8 +1,8 @@ import { TestDbFactory } from '@/__tests__/db.factory'; import { IConfigurationService } from '@/config/configuration.service.interface'; import { AccountsDatasource } from '@/datasources/accounts/accounts.datasource'; -import { upsertSubscriptionsDtoBuilder } from '@/datasources/accounts/notifications/__tests__/upsert-subscriptions.dto.entity.builder'; -import { NotificationsDatasource } from '@/datasources/accounts/notifications/notifications.datasource'; +import { upsertSubscriptionsDtoBuilder } from '@/datasources/notifications/__tests__/upsert-subscriptions.dto.entity.builder'; +import { NotificationsDatasource } from '@/datasources/notifications/notifications.datasource'; import { FakeCacheService } from '@/datasources/cache/__tests__/fake.cache.service'; import { PostgresDatabaseMigrator } from '@/datasources/db/postgres-database.migrator'; import { NotificationType } from '@/domain/notifications/entities-v2/notification-type.entity'; diff --git a/src/datasources/accounts/notifications/notifications.datasource.ts b/src/datasources/notifications/notifications.datasource.ts similarity index 98% rename from src/datasources/accounts/notifications/notifications.datasource.ts rename to src/datasources/notifications/notifications.datasource.ts index fe7f6cdb4c..3d81920d90 100644 --- a/src/datasources/accounts/notifications/notifications.datasource.ts +++ b/src/datasources/notifications/notifications.datasource.ts @@ -11,7 +11,7 @@ import { UnprocessableEntityException, } from '@nestjs/common'; import postgres from 'postgres'; -import { UpsertSubscriptionsDto } from '@/datasources/accounts/notifications/entities/upsert-subscriptions.dto.entity'; +import { UpsertSubscriptionsDto } from '@/datasources/notifications/entities/upsert-subscriptions.dto.entity'; @Injectable() export class NotificationsDatasource implements INotificationsDatasource { diff --git a/src/domain/interfaces/notifications.datasource.interface.ts b/src/domain/interfaces/notifications.datasource.interface.ts index e45c7f3150..a50edbddab 100644 --- a/src/domain/interfaces/notifications.datasource.interface.ts +++ b/src/domain/interfaces/notifications.datasource.interface.ts @@ -1,4 +1,4 @@ -import { UpsertSubscriptionsDto } from '@/datasources/accounts/notifications/entities/upsert-subscriptions.dto.entity'; +import { UpsertSubscriptionsDto } from '@/datasources/notifications/entities/upsert-subscriptions.dto.entity'; import { NotificationType } from '@/domain/notifications/entities-v2/notification-type.entity'; import { Uuid } from '@/domain/notifications/entities-v2/uuid.entity';