Add Files, Groups, and Admin modules to backend
This commit introduces the Files, Groups, and Admin modules, along with their respective services and controllers. Each module includes basic setup with injectable services, controllers, and initial test specs to ensure they are defined properly. This groundwork prepares the backend for further development and feature implementation.
This commit is contained in:
parent
dba8837f57
commit
6a759bd693
20
apps/backend/src/app/admin/admin.controller.spec.ts
Normal file
20
apps/backend/src/app/admin/admin.controller.spec.ts
Normal file
@ -0,0 +1,20 @@
|
||||
import { Test, TestingModule } from '@nestjs/testing';
|
||||
import { AdminController } from './admin.controller';
|
||||
import { AdminService } from './admin.service';
|
||||
|
||||
describe('AdminController', () => {
|
||||
let controller: AdminController;
|
||||
|
||||
beforeEach(async () => {
|
||||
const module: TestingModule = await Test.createTestingModule({
|
||||
controllers: [AdminController],
|
||||
providers: [AdminService],
|
||||
}).compile();
|
||||
|
||||
controller = module.get<AdminController>(AdminController);
|
||||
});
|
||||
|
||||
it('should be defined', () => {
|
||||
expect(controller).toBeDefined();
|
||||
});
|
||||
});
|
7
apps/backend/src/app/admin/admin.controller.ts
Normal file
7
apps/backend/src/app/admin/admin.controller.ts
Normal file
@ -0,0 +1,7 @@
|
||||
import { Controller } from '@nestjs/common';
|
||||
import { AdminService } from './admin.service';
|
||||
|
||||
@Controller('admin')
|
||||
export class AdminController {
|
||||
constructor(private readonly adminService: AdminService) {}
|
||||
}
|
9
apps/backend/src/app/admin/admin.module.ts
Normal file
9
apps/backend/src/app/admin/admin.module.ts
Normal file
@ -0,0 +1,9 @@
|
||||
import { Module } from '@nestjs/common';
|
||||
import { AdminService } from './admin.service';
|
||||
import { AdminController } from './admin.controller';
|
||||
|
||||
@Module({
|
||||
controllers: [AdminController],
|
||||
providers: [AdminService],
|
||||
})
|
||||
export class AdminModule {}
|
18
apps/backend/src/app/admin/admin.service.spec.ts
Normal file
18
apps/backend/src/app/admin/admin.service.spec.ts
Normal file
@ -0,0 +1,18 @@
|
||||
import { Test, TestingModule } from '@nestjs/testing';
|
||||
import { AdminService } from './admin.service';
|
||||
|
||||
describe('AdminService', () => {
|
||||
let service: AdminService;
|
||||
|
||||
beforeEach(async () => {
|
||||
const module: TestingModule = await Test.createTestingModule({
|
||||
providers: [AdminService],
|
||||
}).compile();
|
||||
|
||||
service = module.get<AdminService>(AdminService);
|
||||
});
|
||||
|
||||
it('should be defined', () => {
|
||||
expect(service).toBeDefined();
|
||||
});
|
||||
});
|
4
apps/backend/src/app/admin/admin.service.ts
Normal file
4
apps/backend/src/app/admin/admin.service.ts
Normal file
@ -0,0 +1,4 @@
|
||||
import { Injectable } from '@nestjs/common';
|
||||
|
||||
@Injectable()
|
||||
export class AdminService {}
|
20
apps/backend/src/app/files/files.controller.spec.ts
Normal file
20
apps/backend/src/app/files/files.controller.spec.ts
Normal file
@ -0,0 +1,20 @@
|
||||
import { Test, TestingModule } from '@nestjs/testing';
|
||||
import { FilesController } from './files.controller';
|
||||
import { FilesService } from './files.service';
|
||||
|
||||
describe('FilesController', () => {
|
||||
let controller: FilesController;
|
||||
|
||||
beforeEach(async () => {
|
||||
const module: TestingModule = await Test.createTestingModule({
|
||||
controllers: [FilesController],
|
||||
providers: [FilesService],
|
||||
}).compile();
|
||||
|
||||
controller = module.get<FilesController>(FilesController);
|
||||
});
|
||||
|
||||
it('should be defined', () => {
|
||||
expect(controller).toBeDefined();
|
||||
});
|
||||
});
|
7
apps/backend/src/app/files/files.controller.ts
Normal file
7
apps/backend/src/app/files/files.controller.ts
Normal file
@ -0,0 +1,7 @@
|
||||
import { Controller } from '@nestjs/common';
|
||||
import { FilesService } from './files.service';
|
||||
|
||||
@Controller('files')
|
||||
export class FilesController {
|
||||
constructor(private readonly filesService: FilesService) {}
|
||||
}
|
9
apps/backend/src/app/files/files.module.ts
Normal file
9
apps/backend/src/app/files/files.module.ts
Normal file
@ -0,0 +1,9 @@
|
||||
import { Module } from '@nestjs/common';
|
||||
import { FilesService } from './files.service';
|
||||
import { FilesController } from './files.controller';
|
||||
|
||||
@Module({
|
||||
controllers: [FilesController],
|
||||
providers: [FilesService],
|
||||
})
|
||||
export class FilesModule {}
|
18
apps/backend/src/app/files/files.service.spec.ts
Normal file
18
apps/backend/src/app/files/files.service.spec.ts
Normal file
@ -0,0 +1,18 @@
|
||||
import { Test, TestingModule } from '@nestjs/testing';
|
||||
import { FilesService } from './files.service';
|
||||
|
||||
describe('FilesService', () => {
|
||||
let service: FilesService;
|
||||
|
||||
beforeEach(async () => {
|
||||
const module: TestingModule = await Test.createTestingModule({
|
||||
providers: [FilesService],
|
||||
}).compile();
|
||||
|
||||
service = module.get<FilesService>(FilesService);
|
||||
});
|
||||
|
||||
it('should be defined', () => {
|
||||
expect(service).toBeDefined();
|
||||
});
|
||||
});
|
4
apps/backend/src/app/files/files.service.ts
Normal file
4
apps/backend/src/app/files/files.service.ts
Normal file
@ -0,0 +1,4 @@
|
||||
import { Injectable } from '@nestjs/common';
|
||||
|
||||
@Injectable()
|
||||
export class FilesService {}
|
20
apps/backend/src/app/groups/groups.controller.spec.ts
Normal file
20
apps/backend/src/app/groups/groups.controller.spec.ts
Normal file
@ -0,0 +1,20 @@
|
||||
import { Test, TestingModule } from '@nestjs/testing';
|
||||
import { GroupsController } from './groups.controller';
|
||||
import { GroupsService } from './groups.service';
|
||||
|
||||
describe('GroupsController', () => {
|
||||
let controller: GroupsController;
|
||||
|
||||
beforeEach(async () => {
|
||||
const module: TestingModule = await Test.createTestingModule({
|
||||
controllers: [GroupsController],
|
||||
providers: [GroupsService],
|
||||
}).compile();
|
||||
|
||||
controller = module.get<GroupsController>(GroupsController);
|
||||
});
|
||||
|
||||
it('should be defined', () => {
|
||||
expect(controller).toBeDefined();
|
||||
});
|
||||
});
|
7
apps/backend/src/app/groups/groups.controller.ts
Normal file
7
apps/backend/src/app/groups/groups.controller.ts
Normal file
@ -0,0 +1,7 @@
|
||||
import { Controller } from '@nestjs/common';
|
||||
import { GroupsService } from './groups.service';
|
||||
|
||||
@Controller('groups')
|
||||
export class GroupsController {
|
||||
constructor(private readonly groupsService: GroupsService) {}
|
||||
}
|
9
apps/backend/src/app/groups/groups.module.ts
Normal file
9
apps/backend/src/app/groups/groups.module.ts
Normal file
@ -0,0 +1,9 @@
|
||||
import { Module } from '@nestjs/common';
|
||||
import { GroupsService } from './groups.service';
|
||||
import { GroupsController } from './groups.controller';
|
||||
|
||||
@Module({
|
||||
controllers: [GroupsController],
|
||||
providers: [GroupsService],
|
||||
})
|
||||
export class GroupsModule {}
|
18
apps/backend/src/app/groups/groups.service.spec.ts
Normal file
18
apps/backend/src/app/groups/groups.service.spec.ts
Normal file
@ -0,0 +1,18 @@
|
||||
import { Test, TestingModule } from '@nestjs/testing';
|
||||
import { GroupsService } from './groups.service';
|
||||
|
||||
describe('GroupsService', () => {
|
||||
let service: GroupsService;
|
||||
|
||||
beforeEach(async () => {
|
||||
const module: TestingModule = await Test.createTestingModule({
|
||||
providers: [GroupsService],
|
||||
}).compile();
|
||||
|
||||
service = module.get<GroupsService>(GroupsService);
|
||||
});
|
||||
|
||||
it('should be defined', () => {
|
||||
expect(service).toBeDefined();
|
||||
});
|
||||
});
|
4
apps/backend/src/app/groups/groups.service.ts
Normal file
4
apps/backend/src/app/groups/groups.service.ts
Normal file
@ -0,0 +1,4 @@
|
||||
import { Injectable } from '@nestjs/common';
|
||||
|
||||
@Injectable()
|
||||
export class GroupsService {}
|
Loading…
x
Reference in New Issue
Block a user