Closed Bug 896791 Opened 11 years ago Closed 11 years ago

Remove old-and-busted device param from API urls in urls.js

Categories

(Marketplace Graveyard :: Consumer Pages, defect, P4)

x86
macOS
defect

Tracking

(Not tracked)

RESOLVED FIXED
2013-12-03

People

(Reporter: basta, Assigned: basta)

References

Details

(Whiteboard: [qa-])

This is rough because it creates an unnecessary duplicate URL param. It also prevents us from abstracting urls.js to be friendly with commonplace.
Priority: -- → P4
The solution here is to add a dist file (url_params.js.dist?) that urls.js uses to add parameters to the query string of URLs. The module should return a function that returns an object describing parameters that should be appended to the API URLs generated by urls.js. For instance: define('url_params', ['user'], function(user) { return function() { return { region: user.get_setting('region') } }; }); In most consumer-facing cases, the above should be all that is needed. Some notes: - The login token should not be handled by this function. - The function will be called one per URL, so static values should be cached for performance reasons. - The module should not request any dependencies that the urls module does not presently request, as this can cause a dependency loop.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Assignee: nobody → mattbasta
Whiteboard: [qa-]
Target Milestone: --- → 2013-12-03
You need to log in before you can comment on or make changes to this bug.