You can probably write this a bit shorter:
```
var isAquabrowser = (!query.api || query.api === 'aquabrowser');
var isSummon = (query.api === 'summon');
```