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 = 'CHANGES TO USERNAMES'; 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! Many of you will have already received an email about some changes coming to our username system. Your login name will now be a unique, public username! This change will make it easier to find, invite, and mention your friends in Habitica's social spaces, and will also allow us to add new features in the future. If you'd like to view or change your username, you can do so in Settings.