Skip to content
This repository has been archived by the owner on Nov 29, 2021. It is now read-only.

Commit

Permalink
feat: delete useless codes
Browse files Browse the repository at this point in the history
  • Loading branch information
YanceyOfficial committed Mar 29, 2020
1 parent 7798c7f commit fadaf4f
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 22 deletions.
8 changes: 1 addition & 7 deletions src/auth/auth.resolver.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { UseGuards } from '@nestjs/common'
import { Request } from 'express'
import { Args, Query, Resolver, Mutation, ID } from '@nestjs/graphql'
import { AuthService } from './auth.service'
import { UserModel } from '../users/models/User.model'
Expand All @@ -9,7 +8,6 @@ import { LoginInput } from './dtos/login.input'
import { RegisterInput } from './dtos/register.input'
import { ValidateTOTPInput } from './dtos/validate-totp.input'
import { GqlAuthGuard } from '../shared/guard/gqlAuth.guard'
import { ReqDecorator } from '../shared/decorators'

@Resolver(() => UserModel)
export class AuthResolver {
Expand All @@ -29,11 +27,7 @@ export class AuthResolver {

@Mutation(() => TOTPModel)
@UseGuards(GqlAuthGuard)
public async createTOTP(
@Args({ name: 'userId', type: () => ID }) userId: string,
@ReqDecorator() req: Request,
) {
console.log(req)
public async createTOTP(@Args({ name: 'userId', type: () => ID }) userId: string) {
return this.authService.createTOTP(userId)
}

Expand Down
4 changes: 0 additions & 4 deletions src/mottos/mottos.resolver.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import {
Body,
Res,
Param,
Get,
Post,
Expand All @@ -10,10 +9,7 @@ import {
UseGuards,
ValidationPipe,
} from '@nestjs/common'
import { Response } from 'express'
import { AuthGuard } from '@nestjs/passport'
import path from 'path'
import fs from 'fs-extra'
import { MottosService } from './mottos.service'
import { CreateMottoDto } from './dtos/createMotto.dto'
import { Motto } from './interfaces/motto.interface'
Expand Down
5 changes: 0 additions & 5 deletions src/shared/decorators/index.ts

This file was deleted.

6 changes: 0 additions & 6 deletions src/shared/decorators/res.decorator.ts

This file was deleted.

0 comments on commit fadaf4f

Please sign in to comment.