import { Injectable } from '@nestjs/common';

@Injectable()
export class AppService {
  getStatus(req: any) {
    const ip = req.headers['x-forwarded-for'] || req.socket?.remoteAddress || req.ip;

    return {
      docs: '/docs',
      health: '/health',
      ip: ip ? ip.split(',')[0].trim() : 'unknown',
      message: '🐴 GoHorseJobs API is running!',
      version: '1.0.0',
    };
  }
}
