- Introduced FeedModule with controller and service - /feed mirrors /posts 1:1 (baseline, deterministic) - No discovery or random logic yet - Prisma + DI fully wired and stable - Backend now frontend-ready for feed consumption
14 lines
376 B
TypeScript
14 lines
376 B
TypeScript
import { Controller, Get, Req } from '@nestjs/common';
|
|
import { FeedService } from './feed.service';
|
|
import { AuthRequest } from '../auth/types/auth-request';
|
|
|
|
@Controller('feed')
|
|
export class FeedController {
|
|
constructor(private readonly feedService: FeedService) {}
|
|
|
|
@Get()
|
|
async getFeed(@Req() req: AuthRequest) {
|
|
return this.feedService.getFeed(req.user);
|
|
}
|
|
}
|