Skip to content

Commit

Permalink
Add base code for users controller
Browse files Browse the repository at this point in the history
  • Loading branch information
devleejb committed Jan 18, 2024
1 parent fde4941 commit 19317af
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
18 changes: 18 additions & 0 deletions backend/src/users/users.controller.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { Test, TestingModule } from "@nestjs/testing";
import { UsersController } from "./users.controller";

describe("UsersController", () => {
let controller: UsersController;

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

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

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

@Controller("users")
export class UsersController {}
2 changes: 2 additions & 0 deletions backend/src/users/users.module.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import { Module } from "@nestjs/common";
import { UsersService } from "./users.service";
import { PrismaService } from "src/db/prisma.service";
import { UsersController } from "./users.controller";

@Module({
providers: [UsersService, PrismaService],
exports: [UsersService],
controllers: [UsersController],
})
export class UsersModule {}

0 comments on commit 19317af

Please sign in to comment.