Skip to content

Commit

Permalink
feat: add article, tag, profile module (#45)
Browse files Browse the repository at this point in the history
  • Loading branch information
khuongln-1346 authored Nov 7, 2024
1 parent 3833388 commit 8a097f4
Show file tree
Hide file tree
Showing 16 changed files with 163 additions and 1 deletion.
5 changes: 4 additions & 1 deletion apps/admin-api/src/api/api.module.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
import { Module } from '@nestjs/common';
import { ArticleModule } from './article/article.module';
import { AuthModule } from './auth/auth.module';
import { ProfileModule } from './profile/profile.module';
import { TagModule } from './tag/tag.module';
import { UserModule } from './user/user.module';

@Module({
imports: [UserModule, AuthModule],
imports: [UserModule, AuthModule, ProfileModule, ArticleModule, TagModule],
})
export class ApiModule {}
18 changes: 18 additions & 0 deletions apps/admin-api/src/api/article/article.controller.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { Test, TestingModule } from '@nestjs/testing';
import { ArticleController } from './article.controller';

describe('ArticleController', () => {
let controller: ArticleController;

beforeEach(async () => {
const module: TestingModule = await Test.createTestingModule({
controllers: [ArticleController],
}).compile();

controller = module.get<ArticleController>(ArticleController);
});

it('should be defined', () => {
expect(controller).toBeDefined();
});
});
4 changes: 4 additions & 0 deletions apps/admin-api/src/api/article/article.controller.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import { Controller } from '@nestjs/common';

@Controller('article')
export class ArticleController {}
9 changes: 9 additions & 0 deletions apps/admin-api/src/api/article/article.module.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { Module } from '@nestjs/common';
import { ArticleController } from './article.controller';
import { ArticleService } from './article.service';

@Module({
controllers: [ArticleController],
providers: [ArticleService],
})
export class ArticleModule {}
18 changes: 18 additions & 0 deletions apps/admin-api/src/api/article/article.service.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { Test, TestingModule } from '@nestjs/testing';
import { ArticleService } from './article.service';

describe('ArticleService', () => {
let service: ArticleService;

beforeEach(async () => {
const module: TestingModule = await Test.createTestingModule({
providers: [ArticleService],
}).compile();

service = module.get<ArticleService>(ArticleService);
});

it('should be defined', () => {
expect(service).toBeDefined();
});
});
4 changes: 4 additions & 0 deletions apps/admin-api/src/api/article/article.service.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import { Injectable } from '@nestjs/common';

@Injectable()
export class ArticleService {}
18 changes: 18 additions & 0 deletions apps/admin-api/src/api/profile/profile.controller.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { Test, TestingModule } from '@nestjs/testing';
import { ProfileController } from './profile.controller';

describe('ProfileController', () => {
let controller: ProfileController;

beforeEach(async () => {
const module: TestingModule = await Test.createTestingModule({
controllers: [ProfileController],
}).compile();

controller = module.get<ProfileController>(ProfileController);
});

it('should be defined', () => {
expect(controller).toBeDefined();
});
});
4 changes: 4 additions & 0 deletions apps/admin-api/src/api/profile/profile.controller.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import { Controller } from '@nestjs/common';

@Controller('profile')
export class ProfileController {}
9 changes: 9 additions & 0 deletions apps/admin-api/src/api/profile/profile.module.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { Module } from '@nestjs/common';
import { ProfileController } from './profile.controller';
import { ProfileService } from './profile.service';

@Module({
controllers: [ProfileController],
providers: [ProfileService],
})
export class ProfileModule {}
18 changes: 18 additions & 0 deletions apps/admin-api/src/api/profile/profile.service.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { Test, TestingModule } from '@nestjs/testing';
import { ProfileService } from './profile.service';

describe('ProfileService', () => {
let service: ProfileService;

beforeEach(async () => {
const module: TestingModule = await Test.createTestingModule({
providers: [ProfileService],
}).compile();

service = module.get<ProfileService>(ProfileService);
});

it('should be defined', () => {
expect(service).toBeDefined();
});
});
4 changes: 4 additions & 0 deletions apps/admin-api/src/api/profile/profile.service.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import { Injectable } from '@nestjs/common';

@Injectable()
export class ProfileService {}
18 changes: 18 additions & 0 deletions apps/admin-api/src/api/tag/tag.controller.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { Test, TestingModule } from '@nestjs/testing';
import { TagController } from './tag.controller';

describe('TagController', () => {
let controller: TagController;

beforeEach(async () => {
const module: TestingModule = await Test.createTestingModule({
controllers: [TagController],
}).compile();

controller = module.get<TagController>(TagController);
});

it('should be defined', () => {
expect(controller).toBeDefined();
});
});
4 changes: 4 additions & 0 deletions apps/admin-api/src/api/tag/tag.controller.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import { Controller } from '@nestjs/common';

@Controller('tag')
export class TagController {}
9 changes: 9 additions & 0 deletions apps/admin-api/src/api/tag/tag.module.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { Module } from '@nestjs/common';
import { TagController } from './tag.controller';
import { TagService } from './tag.service';

@Module({
controllers: [TagController],
providers: [TagService],
})
export class TagModule {}
18 changes: 18 additions & 0 deletions apps/admin-api/src/api/tag/tag.service.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { Test, TestingModule } from '@nestjs/testing';
import { TagService } from './tag.service';

describe('TagService', () => {
let service: TagService;

beforeEach(async () => {
const module: TestingModule = await Test.createTestingModule({
providers: [TagService],
}).compile();

service = module.get<TagService>(TagService);
});

it('should be defined', () => {
expect(service).toBeDefined();
});
});
4 changes: 4 additions & 0 deletions apps/admin-api/src/api/tag/tag.service.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import { Injectable } from '@nestjs/common';

@Injectable()
export class TagService {}

0 comments on commit 8a097f4

Please sign in to comment.