This commit is contained in:
@ -9,4 +9,9 @@ export class AppController {
|
||||
getHello(): string {
|
||||
return this.appService.getHello();
|
||||
}
|
||||
|
||||
@Get('health')
|
||||
health(): { status: string } {
|
||||
return { status: 'ok' };
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,9 +1,4 @@
|
||||
import {
|
||||
IsString,
|
||||
IsOptional,
|
||||
IsEnum,
|
||||
MaxLength,
|
||||
} from 'class-validator';
|
||||
import { IsString, IsOptional, IsEnum, MaxLength } from 'class-validator';
|
||||
import { IdeaStatus, IdeaPriority } from '../entities/idea.entity';
|
||||
|
||||
export class CreateIdeaDto {
|
||||
|
||||
@ -49,7 +49,12 @@ export class Idea {
|
||||
@Column({ type: 'varchar', length: 100, nullable: true })
|
||||
module: string | null;
|
||||
|
||||
@Column({ name: 'target_audience', type: 'varchar', length: 255, nullable: true })
|
||||
@Column({
|
||||
name: 'target_audience',
|
||||
type: 'varchar',
|
||||
length: 255,
|
||||
nullable: true,
|
||||
})
|
||||
targetAudience: string | null;
|
||||
|
||||
@Column({ type: 'text', nullable: true })
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import { Injectable, NotFoundException } from '@nestjs/common';
|
||||
import { InjectRepository } from '@nestjs/typeorm';
|
||||
import { Repository, Like, FindOptionsWhere } from 'typeorm';
|
||||
import { Repository, FindOptionsWhere } from 'typeorm';
|
||||
import { Idea } from './entities/idea.entity';
|
||||
import { CreateIdeaDto, UpdateIdeaDto, QueryIdeasDto } from './dto';
|
||||
|
||||
@ -119,7 +119,7 @@ export class IdeasService {
|
||||
.createQueryBuilder('idea')
|
||||
.select('DISTINCT idea.module', 'module')
|
||||
.where('idea.module IS NOT NULL')
|
||||
.getRawMany();
|
||||
.getRawMany<{ module: string }>();
|
||||
|
||||
return result.map((r) => r.module).filter(Boolean);
|
||||
}
|
||||
|
||||
@ -29,4 +29,4 @@ async function bootstrap() {
|
||||
await app.listen(port);
|
||||
console.log(`Backend running on http://localhost:${port}`);
|
||||
}
|
||||
bootstrap();
|
||||
void bootstrap();
|
||||
|
||||
Reference in New Issue
Block a user