import { authWithHeaders } from '../../middlewares/auth'; const api = {}; // @TODO export this const, cannot export it from here because only routes are exported from // controllers const LAST_ANNOUNCEMENT_TITLE = 'EGG QUEST IN THE SEASONAL SHOP! AND HELPFUL RESOURCES FOR TOUGH TIMES'; const worldDmg = { // @TODO bailey: false, }; /** * @api {get} /api/v3/news Get latest Bailey announcement * @apiName GetNews * @apiGroup News * * * @apiSuccess {Object} html Latest Bailey html * */ api.getNews = { method: 'GET', url: '/news', async handler (req, res) { const baileyClass = worldDmg.bailey ? 'npc_bailey_broken' : 'npc_bailey'; res.status(200).send({ html: `
The Egg Quest is available again in the Seasonal Shop! Strange eggs are appearing all over Habitica. Can you collect them all to earn some colorful Egg pets and mounts?
Hey Habiticans! We hope you're all staying safe and well during this stressful time. We've put together some resources on the Habitica blog for help with maintaining health and wellness, setting up or changing a routine, and more! Take care, we love y'all.