FEAT: create RLS on pi-factory

This commit is contained in:
Gabriel Rosa
2024-08-07 18:16:20 -03:00
parent b0f9f5c77e
commit 5da47e5438
5 changed files with 81 additions and 5 deletions
+16
View File
@@ -633,4 +633,20 @@ export class CatalogController {
return response;
}
@Post('rls-rule')
@ApiOkResponse({ type: GetDatasetCatalogTaskRes })
async addRlsRule(@User() user: RequestUser, @Body() body) {
const { customer_id, customer_name, user_id, username } = user;
const metadata = PackTheMetadata({
customer_id,
customer_name,
user_id,
username,
});
console.log(body);
const response = await this.catalogService.addRlsRule(body, metadata);
return response;
}
}