Skip to content

Commit

Permalink
fix: remove post decorator
Browse files Browse the repository at this point in the history
  • Loading branch information
ChoGathK committed Sep 25, 2022
1 parent 7fde243 commit db79757
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 20 deletions.
15 changes: 0 additions & 15 deletions src/decorator/controller.ts

This file was deleted.

1 change: 0 additions & 1 deletion src/decorator/index.ts
@@ -1,2 +1 @@
export * from './async-inject';
export * from './controller';
7 changes: 3 additions & 4 deletions test/decorator.spec.ts
@@ -1,5 +1,5 @@
import { beforeEach, describe, expect, it } from '@jest/globals';
import { Injectable, Module, Controller } from '@nestjs/common';
import { Injectable, Module, Controller, Get } from '@nestjs/common';
import { Test } from '@nestjs/testing';
import * as request from 'supertest';

Expand All @@ -8,7 +8,6 @@ import {
AsyncInjectable,
AsyncProvider,
AsyncProviderFactory,
Post,
} from '../src';

@AsyncInjectable
Expand Down Expand Up @@ -75,7 +74,7 @@ class NameDomain {}
class NameController {
constructor(private readonly name: NameService) {}

@Post()
@Get()
result() {
return { data: this.name.get() };
}
Expand All @@ -100,7 +99,7 @@ beforeEach(async () => {

describe('decorator', () => {
it('test', async () => {
const data = await request(app.getHttpServer()).post('/name');
const data = await request(app.getHttpServer()).get('/name');

expect(data.statusCode).toBe(200);
expect(data.body.data.name).toBe('InfrastructureProvider');
Expand Down

0 comments on commit db79757

Please sign in to comment.