mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
21 lines
674 B
TypeScript
21 lines
674 B
TypeScript
import { ListDataStoreQueryDto } from '@n8n/api-types';
|
|
import { AuthenticatedRequest } from '@n8n/db';
|
|
import { Get, GlobalScope, Query, RestController } from '@n8n/decorators';
|
|
|
|
import { DataStoreAggregateService } from './data-store-aggregate.service';
|
|
|
|
@RestController('/data-tables-global')
|
|
export class DataStoreAggregateController {
|
|
constructor(private readonly dataStoreAggregateService: DataStoreAggregateService) {}
|
|
|
|
@Get('/')
|
|
@GlobalScope('dataStore:list')
|
|
async listDataStores(
|
|
req: AuthenticatedRequest,
|
|
_res: Response,
|
|
@Query payload: ListDataStoreQueryDto,
|
|
) {
|
|
return await this.dataStoreAggregateService.getManyAndCount(req.user, payload);
|
|
}
|
|
}
|