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 = 'HABITICA ENAMEL PIN KICKSTARTER!'; 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 adventurers! The Habitica team is excited to announce a new way you can bring RPG magic into your daily life. We’re launching a Kickstarter campaign to fund enamel pins with the insignia of our four playable classes! If our funding goal is met, backers will get the pin(s) of their choice, a special profile badge and, depending on the funding tier you choose, you can get exclusive animated in-game items. The campaign ends on September 10, so be sure to take a peek soon!
We’re excited to bring you these new ways to show your Habitica pride. Thank you all so much for all your support and for just being a part of our community.