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 = 'LAST CHANCE FOR SUBSCRIBER ITEMS, MAGIC POTIONS AVAILABLE INTO APRIL, AND COMMUNITY GUIDELINES UPDATES'; 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: `
Reminder: this is the final day to subscribe and receive the Daring Dragonfly Set! Subscribing also lets you buy gems for gold. The longer your subscription, the more gems you get!
Thanks so much for your support! You help keep Habitica running.
Due to popular demand, we've extended the availability of the Rainbow and Shimmer Magic Hatching Potions until Spring Fling ends on April 30! Be sure to grab them from the Market before then! If they come back, it won't be until next year at the earliest, so don't delay!
We've made some important updates to the Community Guidelines to make it easier to read, as well as to clarify some policies on subjects such as promotional Challenges, spamming, and more. Be sure to read it before you chat in the Tavern, in Guilds, or in your Party!
Thanks for helping us keep Habitica's community happy and safe!
Encountering a community issue? There's a new, simple way to get in touch with the moderator team: the moderator contact form! You can access it under the Help menu, under the Helpful Links in the Tavern sidebar, or on the Contact Us page. This is always the best and fastest way to contact a moderator if you need help. We hope that it will be useful!