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 = 'VALENTINE\'S DAY CELEBRATION AND CHAT IMPROVEMENTS'; 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: `
In honor of Habitica's holiday celebrating all forms of love, whether it's friendship, familial, or romantic, some of the shopkeepers are dressed up! Take a look around to enjoy their new festive decorations.
Help motivate all of the lovely people in your life by sending them a caring Valentine. For the next week only, Valentines can be purchased for 10 gold from the Market. For spreading love and joy throughout the community, both the giver AND the receiver get a coveted "Adoring Friends" badge. Hooray!
While you're there, why not check out the other cards that are available to send to your party? Each one gives a special achievement of its own...
We've deployed some behind-the-scenes improvements to the Tavern chat, which should cause the messages and avatars to load more quickly. Additionally, each chat message that you post in the Tavern and in Guilds will now remember the outfit your avatar was wearing when you post it, even on a refresh! We hope that these changes will make chatting even more enjoyable.