Skip to content

Commit

Permalink
style: importSorting
Browse files Browse the repository at this point in the history
  • Loading branch information
niamu01 committed Jul 3, 2024
1 parent c913554 commit c8a752d
Show file tree
Hide file tree
Showing 25 changed files with 44 additions and 45 deletions.
2 changes: 1 addition & 1 deletion src/auth/auth.service.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Inject, Injectable, Logger } from '@nestjs/common';
import { IAuthRepository } from './repository/auth.repository.interface';
import { UserSessionDto } from 'src/auth/dto/user.session.dto';
import { IAuthRepository } from './repository/auth.repository.interface';

@Injectable()
export class AuthService {
Expand Down
4 changes: 2 additions & 2 deletions src/auth/guard/jwt-sign.guard.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { Request, Response } from 'express';
import {
CanActivate,
ExecutionContext,
Injectable,
Logger,
} from '@nestjs/common';
import { Observable } from 'rxjs';
import { JwtService } from '@nestjs/jwt';
import { Request, Response } from 'express';
import { Observable } from 'rxjs';
import { UserSessionDto } from 'src/auth/dto/user.session.dto';

/**
Expand Down
4 changes: 2 additions & 2 deletions src/auth/srategy/auth.admin.strategy.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { ExtractJwt, Strategy } from 'passport-jwt';
import { PassportStrategy } from '@nestjs/passport';
import { Injectable } from '@nestjs/common';
import { ConfigService } from '@nestjs/config';
import { PassportStrategy } from '@nestjs/passport';
import { ExtractJwt, Strategy } from 'passport-jwt';
import { UserSessionDto } from '../dto/user.session.dto';

/**
Expand Down
4 changes: 2 additions & 2 deletions src/auth/srategy/auth.external.strategy.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { ExtractJwt, Strategy } from 'passport-jwt';
import { PassportStrategy } from '@nestjs/passport';
import { Injectable } from '@nestjs/common';
import { ConfigService } from '@nestjs/config';
import { PassportStrategy } from '@nestjs/passport';
import { ExtractJwt, Strategy } from 'passport-jwt';

/**
* 외부 API용 passport-jwt Strategy
Expand Down
4 changes: 2 additions & 2 deletions src/auth/srategy/auth.strategy.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { ExtractJwt, Strategy } from 'passport-jwt';
import { PassportStrategy } from '@nestjs/passport';
import { Injectable } from '@nestjs/common';
import { ConfigService } from '@nestjs/config';
import { PassportStrategy } from '@nestjs/passport';
import { ExtractJwt, Strategy } from 'passport-jwt';
import { UserSessionDto } from '../dto/user.session.dto';

/**
Expand Down
2 changes: 1 addition & 1 deletion src/entities/alive.entity.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Cluster from 'src/enums/cluster.enum';
import { Entity, Column, Index, PrimaryGeneratedColumn } from 'typeorm';
import { Column, Entity, Index, PrimaryGeneratedColumn } from 'typeorm';

// deprecated
@Entity()
Expand Down
2 changes: 1 addition & 1 deletion src/entities/card-issuance.entity.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {
Entity,
Column,
Entity,
JoinColumn,
ManyToOne,
PrimaryGeneratedColumn,
Expand Down
2 changes: 1 addition & 1 deletion src/entities/device-info.entity.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Cluster from 'src/enums/cluster.enum';
import InOut from 'src/enums/inout.enum';
import { Entity, Column, PrimaryColumn } from 'typeorm';
import { Column, Entity, PrimaryColumn } from 'typeorm';

@Entity('DEVICE_INFO')
export class DeviceInfo {
Expand Down
2 changes: 1 addition & 1 deletion src/entities/inout.entity.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Cluster from 'src/enums/cluster.enum';
import InOut from 'src/enums/inout.enum';
import { Entity, Column, Index, PrimaryGeneratedColumn } from 'typeorm';
import { Column, Entity, Index, PrimaryGeneratedColumn } from 'typeorm';

// deprecated
@Entity()
Expand Down
2 changes: 1 addition & 1 deletion src/entities/tag-log.entity.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Entity, Column, PrimaryGeneratedColumn } from 'typeorm';
import { Column, Entity, PrimaryGeneratedColumn } from 'typeorm';

@Entity('TAG_LOG')
export class TagLog {
Expand Down
2 changes: 1 addition & 1 deletion src/entities/user-info.entity.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Entity, Column, OneToMany, PrimaryColumn } from 'typeorm';
import { Column, Entity, OneToMany, PrimaryColumn } from 'typeorm';
import { CardIssuance } from './card-issuance.entity';

@Entity('USER_INFO')
Expand Down
1 change: 0 additions & 1 deletion src/external/where42/dto/where42.response.dto.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { ApiProperty } from '@nestjs/swagger';
import Cluster from 'src/enums/cluster.enum';
import InOut from 'src/enums/inout.enum';

export class Where42ResponseDto {
Expand Down
2 changes: 1 addition & 1 deletion src/middleware/middleware.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Request, Response, NextFunction } from 'express';
import { NextFunction, Request, Response } from 'express';

export type Middleware = (
req: Request,
Expand Down
6 changes: 3 additions & 3 deletions src/reissue/reissue.module.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { Module } from '@nestjs/common';
import { ReissueService } from './reissue.service';
import { ReissueController } from './reissue.controller';
import { UserCardRepository } from './repository/mysql/user-card-no.repository';
import { TypeOrmModule } from '@nestjs/typeorm';
import { UserInfo } from 'src/entities/user-info.entity';
import { ReissueController } from './reissue.controller';
import { ReissueService } from './reissue.service';
import { CardReissueRepository } from './repository/googleApi/card-reissue.repository';
import { UserCardRepository } from './repository/mysql/user-card-no.repository';

const userCardRepo = {
provide: 'IUserCardRepository',
Expand Down
12 changes: 6 additions & 6 deletions src/reissue/reissue.service.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import axios from 'axios';
import {
HttpException,
Inject,
Expand All @@ -7,14 +6,15 @@ import {
NotFoundException,
} from '@nestjs/common';
import { ConfigService } from '@nestjs/config';
import axios from 'axios';
import { CardReissue } from 'src/entities/card-reissue.entity';
import ReissueState from 'src/enums/reissue-state.enum';
import { UserSessionDto } from '../auth/dto/user.session.dto';
import { IUserCardRepository } from './repository/interface/user-card-no.repository.interface';
import { StateDto } from './dto/state.dto';
import { RequestDto } from './dto/request.dto';
import { FinishedDto } from './dto/finished.dto';
import ReissueState from 'src/enums/reissue-state.enum';
import { RequestDto } from './dto/request.dto';
import { StateDto } from './dto/state.dto';
import { ICardReissueRepository } from './repository/interface/card-reissue.repository.interface';
import { CardReissue } from 'src/entities/card-reissue.entity';
import { IUserCardRepository } from './repository/interface/user-card-no.repository.interface';

@Injectable()
export class ReissueService {
Expand Down
4 changes: 2 additions & 2 deletions src/reissue/repository/googleApi/card-reissue.repository.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { auth, sheets } from '@googleapis/sheets';
import { Inject, Logger } from '@nestjs/common';
import { ICardReissueRepository } from '../interface/card-reissue.repository.interface';
import { ConfigService } from '@nestjs/config';
import { sheets, auth } from '@googleapis/sheets';
import { CardReissue } from 'src/entities/card-reissue.entity';
import { ICardReissueRepository } from '../interface/card-reissue.repository.interface';

export class CardReissueRepository implements ICardReissueRepository {
private logger = new Logger(CardReissueRepository.name);
Expand Down
2 changes: 1 addition & 1 deletion src/reissue/repository/mysql/user-card-no.repository.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { IUserCardRepository } from '../interface/user-card-no.repository.interface';
import { InjectRepository } from '@nestjs/typeorm';
import { UserInfo } from 'src/entities/user-info.entity';
import { Repository } from 'typeorm/repository/Repository';
import { IUserCardRepository } from '../interface/user-card-no.repository.interface';

export class UserCardRepository implements IUserCardRepository {
constructor(
Expand Down
6 changes: 3 additions & 3 deletions src/statistics/repository/mysql/statistics.repository.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { InjectRepository } from '@nestjs/typeorm';
import { TagLog } from 'src/entities/tag-log.entity';
import { CadetPerClusterDto } from 'src/statistics/dto/cadet-per-cluster.dto';
import { IStatisticsRepository } from '../interface/statistics.repository.interface';
import { Repository } from 'typeorm';
import { TagLog } from 'src/entities/tag-log.entity';
import { InjectRepository } from '@nestjs/typeorm';
import { IStatisticsRepository } from '../interface/statistics.repository.interface';

export class StatisticsRepository implements IStatisticsRepository {
constructor(
Expand Down
6 changes: 3 additions & 3 deletions src/statistics/statistics.controller.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { Controller, Get, Inject, Logger } from '@nestjs/common';
import { CACHE_MANAGER } from '@nestjs/cache-manager';
import { Controller, Get, Inject, Logger } from '@nestjs/common';
import { ApiOperation, ApiResponse, ApiTags } from '@nestjs/swagger';
import { StatisticsService } from './statistics.service';
import { CadetPerClusterDto } from './dto/cadet-per-cluster.dto';
import { Cache } from 'cache-manager';
import { CadetPerClusterDto } from './dto/cadet-per-cluster.dto';
import { StatisticsService } from './statistics.service';

@ApiTags('통계 관련 API')
@Controller({
Expand Down
4 changes: 2 additions & 2 deletions src/statistics/statistics.module.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { Module } from '@nestjs/common';
import { TypeOrmModule } from '@nestjs/typeorm';
import { TagLog } from 'src/entities/tag-log.entity';
import { StatisticsRepository } from './repository/mysql/statistics.repository';
import { StatisticsService } from './statistics.service';
import { StatisticsController } from './statistics.controller';
import { TagLog } from 'src/entities/tag-log.entity';
import { StatisticsService } from './statistics.service';

const statisticsRepo = {
provide: 'IStatisticsRepository',
Expand Down
2 changes: 1 addition & 1 deletion src/statistics/statistics.service.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Cache } from 'cache-manager';
import { CACHE_MANAGER } from '@nestjs/cache-manager';
import { Inject, Injectable, Logger } from '@nestjs/common';
import { Cache } from 'cache-manager';
import { CadetPerClusterDto } from './dto/cadet-per-cluster.dto';
import { IStatisticsRepository } from './repository/interface/statistics.repository.interface';

Expand Down
6 changes: 3 additions & 3 deletions src/tag-log/repository/mysql/device-info.repository.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { DeviceInfoDto } from 'src/tag-log/dto/device-info.dto';
import { IDeviceInfoRepository } from '../interface/device-info-repository.interface';
import { InjectRepository } from '@nestjs/typeorm';
import { Repository } from 'typeorm';
import { DeviceInfo } from 'src/entities/device-info.entity';
import { DeviceInfoDto } from 'src/tag-log/dto/device-info.dto';
import { Repository } from 'typeorm';
import { IDeviceInfoRepository } from '../interface/device-info-repository.interface';

export class DeviceInfoRepository implements IDeviceInfoRepository {
constructor(
Expand Down
2 changes: 1 addition & 1 deletion src/user/user.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import { Module } from '@nestjs/common';
import { TypeOrmModule } from '@nestjs/typeorm';
import { UserInfo } from 'src/entities/user-info.entity';
import { UserInfoRepository } from './repository/mysql/user-info.repository';
import { UserV1Controller } from './user.v1.controller';
import { UserService } from './user.service';
import { UserV1Controller } from './user.v1.controller';

const userInfoRepo = {
provide: 'IUserInfoRepository',
Expand Down
4 changes: 2 additions & 2 deletions src/user/user.v1.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ import {
ApiResponse,
ApiTags,
} from '@nestjs/swagger';
import { User } from 'src/auth/user.decorator';
import { UserSessionDto } from 'src/auth/dto/user.session.dto';
import { AdminAuthGuard } from 'src/auth/guard/admin-auth.guard';
import { User } from 'src/auth/user.decorator';
import { IdLoginDto } from './dto/id-login.dto';
import { UserService } from './user.service';
import { AdminAuthGuard } from 'src/auth/guard/admin-auth.guard';

@ApiTags('유저 정보 관련')
@Controller({
Expand Down
2 changes: 1 addition & 1 deletion test/webhook.e2e-spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Test, TestingModule } from '@nestjs/testing';
import { INestApplication } from '@nestjs/common';
import { Test, TestingModule } from '@nestjs/testing';
import { AppModule } from './../src/app.module.e2e-spec';

describe('WebhookModule (e2e)', () => {
Expand Down

0 comments on commit c8a752d

Please sign in to comment.