import { authWithHeaders } from '../../middlewares/auth'; let api = {}; // @TODO export this const, cannot export it from here because only routes are exported from controllers const LAST_ANNOUNCEMENT_TITLE = 'BEFFYMAROO AT WONDERCON!'; 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: `
Hello Habiticans! Beffymaroo will be representing Habitica at Wondercon this year. She'll be handing out Habitica stickers, promo codes for the Unconventional Armor set, and other exciting special swag (quantities limited!). Look for her running around the con in her handmade Melior Hood Scarf on Friday, March 29!