feat(api): add GroupsModule with GET /groups endpoint

Implements TDD-driven GroupsService and GroupsController with full unit test coverage. GET /groups returns all groups ordered by name, selecting id, name, platform, platformId, isActive, and accountId fields.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-28 00:55:13 +05:30
parent e73d39b798
commit 0e92b24bf0
5 changed files with 94 additions and 0 deletions
@@ -0,0 +1,14 @@
import { Injectable } from '@nestjs/common';
import { PrismaService } from '../../prisma/prisma.service';
@Injectable()
export class GroupsService {
constructor(private readonly prisma: PrismaService) {}
list() {
return this.prisma.group.findMany({
orderBy: { name: 'asc' },
select: { id: true, name: true, platform: true, platformId: true, isActive: true, accountId: true },
});
}
}