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 = 'UNIQUE USERNAMES ARE HERE!'; 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! We're excited to announce the launch of our unique username system! We've made this change so it’s easier to find and invite your friends to Parties, Guilds, and Challenges, mention people in chat, and more. In the future we hope to use this functionality to introduce even more useful features, such as the option to receive notifications if you are mentioned in chat.
You can check and change your current Username in Settings. If you've just confirmed, check your Stable to find the Veteran Pet you've been given as a reward!
If you’d like to learn more about this change, this Wiki page has more detailed information.
Thank you for being patient as we make these changes to improve Habitica!