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 MARCH SUBSCRIBER GEAR! AND THE APRIL FOOL PROMISES HEʼLL BEHAVE THIS YEAR'; 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 weekend is your final chance to subscribe and receive the Egg-squisite Armor Set! Subscribing also lets you buy Gems with Gold. The longer your subscription, the more Gems you get!
Thanks so much for your support! You help keep Habitica running.
As March in Habitica comes to a close, everyone is wondering what the ever-impish Master of Rogues, the April Fool, might have in store for his favorite holiday.
He's stopped by the Tavern today, ostensibly for lunch, but he seems keen to put everyone at ease about the possibility of shenanigans in the near future.
"I've re-committed myself to health!" he says, happily munching on a crisp, ripe pear. "I'm too busy brushing up on nutrition to possibly pull a prank! If anything I'd rather just help every Habitican get more healthy food into their routines."
Beffymaroo smiles and leans to whisper to Piyo and SabreCat, on the next bench.
"Given his track record over the years, I'd say the chance he's going to behave himself this year is about as good as the chance of artichokes falling from the sky."
Perhaps you should check back when April 1st rolls around to see what's in store…