Spaces:
Runtime error
Runtime error
automated-invoice-processing-agent-backend
/
src
/controllers
/propertyware
/portfolio.controller.ts
| import { Request, Response } from 'express'; | |
| import { fetchPortfolio } from '../../shared/services/propertyware.service'; | |
| import PwPortfolio from './../../models/pwPortfolio'; | |
| import { logger } from '../../utils/logger'; | |
| import { syncPortfolioDataService } from '../../shared/services/portfolio.service'; | |
| export const syncPortfolioData = async (req: Request, res: Response) => { | |
| try { | |
| const result = await syncPortfolioDataService(); | |
| res.status(200).send(result); | |
| } catch (error) { | |
| logger.error('Error syncing Portfolio'); | |
| logger.error(error); | |
| res.status(500).send((error as Error).message); | |
| } | |
| }; | |