|
|
@ -45,6 +45,7 @@ export class OldDatasController { |
|
|
|
async dataCount( |
|
|
|
async dataCount( |
|
|
|
@Request() req, |
|
|
|
@Request() req, |
|
|
|
@Response() res, |
|
|
|
@Response() res, |
|
|
|
|
|
|
|
@Param('projectId') projectId: string, |
|
|
|
@Param('tableName') tableName: string, |
|
|
|
@Param('tableName') tableName: string, |
|
|
|
) { |
|
|
|
) { |
|
|
|
res.json(await this.oldDatasService.getDataCount(req)); |
|
|
|
res.json(await this.oldDatasService.getDataCount(req)); |
|
|
@ -52,13 +53,24 @@ export class OldDatasController { |
|
|
|
|
|
|
|
|
|
|
|
@Post('/nc/:projectId/api/v1/:tableName') |
|
|
|
@Post('/nc/:projectId/api/v1/:tableName') |
|
|
|
@Acl('dataInsert') |
|
|
|
@Acl('dataInsert') |
|
|
|
async dataInsert(@Request() req, @Response() res) { |
|
|
|
async dataInsert( |
|
|
|
|
|
|
|
@Request() req, |
|
|
|
|
|
|
|
@Response() res, |
|
|
|
|
|
|
|
@Param('projectId') projectId: string, |
|
|
|
|
|
|
|
@Param('tableName') tableName: string, |
|
|
|
|
|
|
|
) { |
|
|
|
res.json(await this.oldDatasService.dataInsert(req)); |
|
|
|
res.json(await this.oldDatasService.dataInsert(req)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Get('/nc/:projectId/api/v1/:tableName/:rowId') |
|
|
|
@Get('/nc/:projectId/api/v1/:tableName/:rowId') |
|
|
|
@Acl('dataRead') |
|
|
|
@Acl('dataRead') |
|
|
|
async dataRead(@Request() req, @Response() res) { |
|
|
|
async dataRead( |
|
|
|
|
|
|
|
@Request() req, |
|
|
|
|
|
|
|
@Response() res, |
|
|
|
|
|
|
|
@Param('projectId') projectId: string, |
|
|
|
|
|
|
|
@Param('tableName') tableName: string, |
|
|
|
|
|
|
|
@Param('rowId') rowId: string, |
|
|
|
|
|
|
|
) { |
|
|
|
res.json(await this.oldDatasService.dataRead(req)); |
|
|
|
res.json(await this.oldDatasService.dataRead(req)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|