feat: complete cmpp platform phases 0-5
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
import { Body, Controller, Get, Post } from '@nestjs/common';
|
||||
import { ApiTags } from '@nestjs/swagger';
|
||||
import { TenantId } from '../common/tenant-id.decorator';
|
||||
import { CreateFileObjectDto, CreatePresignedUploadDto, FilesService } from './files.service';
|
||||
|
||||
@ApiTags('files')
|
||||
@Controller('admin/files')
|
||||
export class FilesController {
|
||||
constructor(private readonly files: FilesService) {}
|
||||
|
||||
@Get()
|
||||
list(@TenantId() tenantId?: string) {
|
||||
return this.files.list(tenantId);
|
||||
}
|
||||
|
||||
@Post()
|
||||
create(@Body() body: CreateFileObjectDto) {
|
||||
return this.files.create(body);
|
||||
}
|
||||
|
||||
@Post('presigned-upload')
|
||||
createPresignedUpload(@Body() body: CreatePresignedUploadDto) {
|
||||
return this.files.createPresignedUpload(body);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user