Skip to content
Snippets Groups Projects
Commit c011634d authored by Hugo SUBTIL's avatar Hugo SUBTIL
Browse files

clean: remove unused code + console.log

parent d450d44c
No related branches found
No related tags found
3 merge requests!27Recette,!26Dev,!24Poc/ghost
import { Controller, Get, HttpService } from '@nestjs/common';
import { Controller, Get, HttpService, Query } from '@nestjs/common';
import { Observable } from 'rxjs';
import { Post } from './schemas/post.schema';
import { map } from 'rxjs/operators';
import { ApiBearerAuth, ApiQuery } from '@nestjs/swagger';
import { Query } from '@nestjs/common';
import { Post } from './schemas/post.schema';
@Controller('posts')
export class PostsController {
......@@ -19,7 +18,6 @@ export class PostsController {
@ApiQuery({ name: 'page', type: String, required: false })
@ApiQuery({ name: 'order', type: String, required: false })
public async findAll(@Query() query): Promise<Observable<{ posts: Post[] }>> {
console.log(query);
return this.httpService
.get(`${process.env.GHOST_HOST_AND_PORT}/ghost/api/v3/content/posts`, {
params: {
......
......@@ -23,7 +23,6 @@ export class UsersController {
}
@Post()
@ApiBearerAuth('JWT')
@ApiResponse({ status: 201, description: 'User created' })
public async create(@Body() createUserDto: CreateUserDto) {
// remove structureId for creation and add structure after
......@@ -40,7 +39,6 @@ export class UsersController {
}
@Post('verify/:id')
@ApiBearerAuth('JWT')
@ApiParam({ name: 'id', type: String, required: true })
@ApiResponse({ status: 201, description: 'User verified' })
@ApiResponse({ status: 401, description: "This token does'nt exist or is not associate to this user." })
......@@ -49,7 +47,6 @@ export class UsersController {
}
@UseGuards(JwtAuthGuard)
@ApiBearerAuth('JWT')
@Post('change-password')
@ApiResponse({ status: 201, description: 'Password changed' })
@ApiResponse({ status: 401, description: 'Invalid password' })
......@@ -63,7 +60,6 @@ export class UsersController {
}
@UseGuards(JwtAuthGuard)
@ApiBearerAuth('JWT')
@Post('change-email')
@ApiResponse({ status: 201, description: 'Email confirmation send' })
@ApiResponse({ status: 401, description: 'Invalid Email' })
......@@ -72,7 +68,6 @@ export class UsersController {
}
@UseGuards(JwtAuthGuard)
@ApiBearerAuth('JWT')
@Post('verify-change-email')
@ApiResponse({ status: 201, description: 'Email changed' })
@ApiResponse({ status: 401, description: 'Invalid Token' })
......@@ -81,14 +76,12 @@ export class UsersController {
}
@Post('reset-password')
@ApiBearerAuth('JWT')
@ApiResponse({ status: 200, description: 'Email sent if account exist' })
public async resetPassword(@Body() passwordReset: PasswordResetDto) {
return this.usersService.sendResetPasswordEmail(passwordReset.email);
}
@Post('reset-password/apply')
@ApiBearerAuth('JWT')
@ApiResponse({ status: 200, description: 'Email sent if account exist' })
public async resetPasswordApply(@Body() passwordResetApplyDto: PasswordResetApplyDto) {
return this.usersService.validatePasswordResetToken(passwordResetApplyDto.password, passwordResetApplyDto.token);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment