Spaces:
Runtime error
Runtime error
File size: 651 Bytes
1f6a8f9 2c97468 9c63b5a 1f6a8f9 185ec1f d747060 185ec1f |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
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);
}
};
|