2022-03-27 14:58:54 -05:00
|
|
|
import { Body, Controller, Post } from '@nestjs/common';
|
|
|
|
|
import { ObjectDetectionService } from './object-detection.service';
|
2022-05-11 06:18:11 -05:00
|
|
|
import { Logger } from '@nestjs/common';
|
2022-03-27 14:58:54 -05:00
|
|
|
|
|
|
|
|
@Controller('object-detection')
|
|
|
|
|
export class ObjectDetectionController {
|
|
|
|
|
constructor(
|
|
|
|
|
private readonly objectDetectionService: ObjectDetectionService,
|
2022-05-11 06:18:11 -05:00
|
|
|
) { }
|
2022-03-27 14:58:54 -05:00
|
|
|
|
2022-06-11 16:12:06 -05:00
|
|
|
@Post('/detect-object')
|
2022-03-27 14:58:54 -05:00
|
|
|
async detectObject(@Body('thumbnailPath') thumbnailPath: string) {
|
|
|
|
|
return await this.objectDetectionService.detectObject(thumbnailPath);
|
|
|
|
|
}
|
|
|
|
|
}
|