Api quest restrictions - no purchase/start without fulfilling eligibility requirements (#10387)

* removing duplicate translation key

* fixing typos

* extracting quest prerequisite check. adding check for previous quest completion, if required

* fixing (undoing) static change, adding tests

* more typos

* correcting test failures

* honoring quest prerequisites in quest invite API call. updating format of il8n string replacement arg

* no longer using apiError, use translate method instead (msg key was not defined)

* adding @apiError to docblock as requested in issue

* removing checks on quest invite method. small window of opportunity/low risk
This commit is contained in:
Brian Fenton
2018-05-27 09:41:56 -05:00
committed by Matteo Pagliazzi
parent 8fb67e7944
commit ac90a40be5
9 changed files with 64 additions and 11 deletions

View File

@@ -20,7 +20,7 @@ const app = express();
app.set('port', nconf.get('PORT'));
// Setup translations
// Must come before attach middlwares so Mongoose validations can use translations
// Must come before attach middlewares so Mongoose validations can use translations
import './libs/i18n';
import attachMiddlewares from './middlewares/index';