|
|
@ -1,4 +1,16 @@ |
|
|
|
import { Controller, Get, HttpCode, Param, Post, Request } from '@nestjs/common' |
|
|
|
import { |
|
|
|
|
|
|
|
Controller, |
|
|
|
|
|
|
|
Get, |
|
|
|
|
|
|
|
HttpCode, |
|
|
|
|
|
|
|
Param, |
|
|
|
|
|
|
|
Post, |
|
|
|
|
|
|
|
Request, |
|
|
|
|
|
|
|
UseInterceptors, |
|
|
|
|
|
|
|
} from '@nestjs/common'; |
|
|
|
|
|
|
|
import { AnyFilesInterceptor } from '@nestjs/platform-express'; |
|
|
|
|
|
|
|
import multer from 'multer'; |
|
|
|
|
|
|
|
import { NC_ATTACHMENT_FIELD_SIZE } from '../../constants'; |
|
|
|
|
|
|
|
import { UploadAllowedInterceptor } from '../../interceptors/is-upload-allowed/is-upload-allowed.interceptor'; |
|
|
|
import { PublicDatasService } from './public-datas.service'; |
|
|
|
import { PublicDatasService } from './public-datas.service'; |
|
|
|
|
|
|
|
|
|
|
|
@Controller() |
|
|
|
@Controller() |
|
|
@ -47,6 +59,15 @@ export class PublicDatasController { |
|
|
|
// );
|
|
|
|
// );
|
|
|
|
@Post('/api/v1/db/public/shared-view/:sharedViewUuid/rows') |
|
|
|
@Post('/api/v1/db/public/shared-view/:sharedViewUuid/rows') |
|
|
|
@HttpCode(200) |
|
|
|
@HttpCode(200) |
|
|
|
|
|
|
|
@UseInterceptors( |
|
|
|
|
|
|
|
UploadAllowedInterceptor, |
|
|
|
|
|
|
|
AnyFilesInterceptor({ |
|
|
|
|
|
|
|
storage: multer.diskStorage({}), |
|
|
|
|
|
|
|
limits: { |
|
|
|
|
|
|
|
fileSize: NC_ATTACHMENT_FIELD_SIZE, |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
}), |
|
|
|
|
|
|
|
) |
|
|
|
async dataInsert( |
|
|
|
async dataInsert( |
|
|
|
@Request() req, |
|
|
|
@Request() req, |
|
|
|
@Param('sharedViewUuid') sharedViewUuid: string, |
|
|
|
@Param('sharedViewUuid') sharedViewUuid: string, |
|
|
|