Skip to content

Commit

Permalink
reorganise
Browse files Browse the repository at this point in the history
  • Loading branch information
aradwann committed Mar 6, 2023
1 parent 2b62632 commit 45253e5
Show file tree
Hide file tree
Showing 49 changed files with 36 additions and 37 deletions.
2 changes: 1 addition & 1 deletion src/app.controller.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Controller, Get } from '@nestjs/common';
import { AppService } from './app.service';
import { Public } from './auth/decorators/public.decorator';
import { Public } from './components/auth/decorators/public.decorator';

@Controller()
export class AppController {
Expand Down
14 changes: 7 additions & 7 deletions src/app.module.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
import { Module } from '@nestjs/common';
import { AppController } from './app.controller';
import { AppService } from './app.service';
import { UsersModule } from './users/users.module';
import { UrlChecksModule } from './url-checks/url-checks.module';
import { ReportsModule } from './reports/reports.module';
import { ConfigModule, ConfigService } from '@nestjs/config';
import { TypeOrmModule } from '@nestjs/typeorm';
import { AuthModule } from './auth/auth.module';
import { AuthModule } from './components/auth/auth.module';
import { APP_GUARD } from '@nestjs/core';
import { JwtAuthGuard } from './auth/guards/jwt-auth.guard';
import { EmailModule } from './email/email.module';
import { PollingModule } from './polling/polling.module';
import { JwtAuthGuard } from './components/auth/guards/jwt-auth.guard';
import { ScheduleModule } from '@nestjs/schedule';
import { validate } from './config/env.validation';
import { envFilePath } from './config/configuration';
import { EmailModule } from './components/email/email.module';
import { PollingModule } from './components/polling/polling.module';
import { ReportsModule } from './components/reports/reports.module';
import { UrlChecksModule } from './components/url-checks/url-checks.module';
import { UsersModule } from './components/users/users.module';
// import { UrlCheckSubscriber } from './url-checks/entities/subscribers/url-check.subscriber';

@Module({
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Injectable } from '@nestjs/common';
import { JwtService } from '@nestjs/jwt';
import { User } from 'src/users/entities/user.entity';
import * as nodemailer from 'nodemailer';
import { User } from '../users/entities/user.entity';

@Injectable()
export class EmailService {
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Module } from '@nestjs/common';
import { PollingService } from './polling.service';
import { PollingController } from './polling.controller';
import { HttpModule } from '@nestjs/axios';
import { ReportsModule } from 'src/reports/reports.module';
import { ReportsModule } from '../reports/reports.module';

@Module({
imports: [HttpModule, ReportsModule],
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { HttpService } from '@nestjs/axios';
import { Injectable, Logger } from '@nestjs/common';
import { SchedulerRegistry } from '@nestjs/schedule';
import { Status } from 'src/reports/entities/report.entity';
import { ReportsService } from 'src/reports/reports.service';
import { UrlCheck } from 'src/url-checks/entities/url-check.entity';
import * as https from 'https';
import { Status } from '../reports/entities/report.entity';
import { ReportsService } from '../reports/reports.service';
import { UrlCheck } from '../url-checks/entities/url-check.entity';
/**
* TODO:
* WORKFLOW A
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { IsEnum, IsNumber } from 'class-validator';
import { UrlCheck } from 'src/url-checks/entities/url-check.entity';
import { UrlCheck } from 'src/components/url-checks/entities/url-check.entity';
import {
Column,
CreateDateColumn,
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Module } from '@nestjs/common';
import { ReportsService } from './reports.service';
import { Log } from './entities/log.entity';
import { TypeOrmModule } from '@nestjs/typeorm';
import { Log } from './entities/log.entity';
import { ReportsService } from './reports.service';

@Module({
imports: [TypeOrmModule.forFeature([Log])],
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { Injectable } from '@nestjs/common';
import { InjectRepository } from '@nestjs/typeorm';
import { UrlCheck } from 'src/url-checks/entities/url-check.entity';
import { Repository } from 'typeorm';

import { UrlCheck } from '../url-checks/entities/url-check.entity';
import { Log } from './entities/log.entity';
import { Status } from './entities/report.entity';

Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Injectable } from '@nestjs/common';
import { InjectConnection } from '@nestjs/typeorm';
import { PollingService } from 'src/polling/polling.service';
import { PollingService } from 'src/components/polling/polling.service';
import {
// EventSubscriber,
EntitySubscriberInterface,
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Log } from 'src/reports/entities/log.entity';
import { User } from 'src/users/entities/user.entity';
import { Log } from 'src/components/reports/entities/log.entity';
import { User } from 'src/components/users/entities/user.entity';
import {
Column,
CreateDateColumn,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ import {
import { UrlChecksService } from './url-checks.service';
import { CreateUrlCheckDto } from './dto/create-url-check.dto';
import { UpdateUrlCheckDto } from './dto/update-url-check.dto';
import { CurrentUser } from 'src/auth/decorators/current-user.decorator';
import { User } from 'src/users/entities/user.entity';
import { CurrentUser } from 'src/components/auth/decorators/current-user.decorator';
import { ApiTags } from '@nestjs/swagger';
import { ReportsService } from 'src/reports/reports.service';
import { ReportsService } from '../reports/reports.service';
import { User } from '../users/entities/user.entity';

@ApiTags('UrlCheck')
@Controller('url-checks')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import { TypeOrmModule } from '@nestjs/typeorm';
import { Tag } from './entities/tag.entity';
import { Authentication } from './entities/authentication.entity';
import { HttpHeader } from './entities/httphHeader.entity';
import { PollingModule } from 'src/polling/polling.module';
import { UrlCheckSubscriber } from './entities/subscribers/url-check.subscriber';
import { ReportsModule } from 'src/reports/reports.module';
import { PollingModule } from '../polling/polling.module';
import { ReportsModule } from '../reports/reports.module';

@Module({
imports: [
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import {
NotFoundException,
} from '@nestjs/common';
import { InjectRepository } from '@nestjs/typeorm';
import { User } from 'src/users/entities/user.entity';
import { Repository } from 'typeorm';
import { User } from '../users/entities/user.entity';
import { CreateUrlCheckDto } from './dto/create-url-check.dto';
import { UpdateUrlCheckDto } from './dto/update-url-check.dto';
// import { Authentication } from './entities/authentication.entity';
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
OneToMany,
} from 'typeorm';
import * as bcrypt from 'bcrypt';
import { UrlCheck } from 'src/url-checks/entities/url-check.entity';
import { UrlCheck } from 'src/components/url-checks/entities/url-check.entity';

@Entity()
export class User {
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ import { CreateUserDto } from './dto/create-user.dto';
import { UpdateUserDto } from './dto/update-user.dto';
import { PaginationQueryDto } from '../common/dto/pagination-query.dto';
import { ApiNotFoundResponse, ApiTags } from '@nestjs/swagger';
import { CurrentUser } from 'src/auth/decorators/current-user.decorator';
import { CurrentUser } from 'src/components/auth/decorators/current-user.decorator';
import { User } from './entities/user.entity';
import { Public } from 'src/auth/decorators/public.decorator';
import { Public } from 'src/components/auth/decorators/public.decorator';

@ApiTags('users')
@Controller('users')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { UsersService } from './users.service';
import { UsersController } from './users.controller';
import { TypeOrmModule } from '@nestjs/typeorm';
import { User } from './entities/user.entity';
import { EmailModule } from 'src/email/email.module';
import { EmailModule } from '../email/email.module';

@Module({
imports: [TypeOrmModule.forFeature([User]), EmailModule],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { Test, TestingModule } from '@nestjs/testing';
import { getRepositoryToken } from '@nestjs/typeorm';
import { EmailModule } from 'src/email/email.module';
import { User } from 'src/users/entities/user.entity';
import { UsersService } from 'src/users/users.service';
import { Repository } from 'typeorm';
import { EmailModule } from '../email/email.module';
import { User } from './entities/user.entity';
import { UsersService } from './users.service';

export type MockType<T> = {
[P in keyof T]?: jest.Mock<object>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import {
NotFoundException,
} from '@nestjs/common';
import { InjectRepository } from '@nestjs/typeorm';
import { PaginationQueryDto } from 'src/common/dto/pagination-query.dto';
import { EmailService } from 'src/email/email.service';
import { Repository } from 'typeorm';
import { PaginationQueryDto } from '../common/dto/pagination-query.dto';
import { EmailService } from '../email/email.service';
import { CreateUserDto } from './dto/create-user.dto';
import { UpdateUserDto } from './dto/update-user.dto';
import { User } from './entities/user.entity';
Expand Down
2 changes: 1 addition & 1 deletion test/users/users.e2e-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { INestApplication } from '@nestjs/common';
import * as request from 'supertest';
import { AppModule } from 'src/app.module';
import { Repository } from 'typeorm';
import { User } from 'src/users/entities/user.entity';
import { getRepositoryToken } from '@nestjs/typeorm';
import { User } from 'src/components/users/entities/user.entity';

describe('UsersController (e2e)', () => {
let app: INestApplication;
Expand Down

0 comments on commit 45253e5

Please sign in to comment.