Answers for "queryfailederror: invalid input syntax for type, nest js uuid:"

0

queryfailederror: invalid input syntax for type, nest js uuid:

/**
   * Get all posts from all users
   post controller.ts
   */
  @Get('find')
  @ApiCreatedResponse({
    status: 201,
    description: 'All posts have been successfully retreived.',
    type: [PostDTO],
  })
  @ApiResponse({ status: 403, description: 'Forbidden.' })
  async find() {
    try {
      return this.postService.findAll();
    } catch (error) {
      throw new Error(error);
    }
  }


 /**
   * Find all posts 
   post service.ts
   */
  async findAll(): Promise<Post[]> {
    const posts = await this.postRepository.find();
    return posts;
  }
Posted by: Guest on September-08-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language