Skip to content
This repository has been archived by the owner on Mar 15, 2018. It is now read-only.

Commit

Permalink
send ?device to the API to get correctly filtered apps (bug 875495)
Browse files Browse the repository at this point in the history
  • Loading branch information
cvan committed May 29, 2013
1 parent a58dcb9 commit c760e1b
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions hearth/media/js/urls.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,26 @@ define('urls',
'payments_status': '/api/v1/webpay/status/{0}/'
};

var _device = function() {
function _dev() {
if (caps.firefoxOS) {
return 'firefoxos';
} else if (caps.firefoxAndroid) {
return 'android';
}
};
}

function _device() {
// TODO: Deprecate this. (This was a quick fix for bug 875495

This comment has been minimized.

Copy link
@mattbasta

mattbasta May 30, 2013

Contributor

Explain to me again why the API needs this?

This comment has been minimized.

Copy link
@mattbasta

mattbasta May 30, 2013

Contributor

3umzxw

This comment has been minimized.

Copy link
@cvan

cvan May 30, 2013

Author Contributor

because I like to 🚢

// until buchets land.)
if (caps.firefoxOS) {
return 'firefoxos';
} else if (caps.firefoxAndroid) {
if (caps.widescreen()) {
return 'tablet';
}
return 'mobile';
}
}

function _userArgs(func) {
return function() {
Expand All @@ -73,7 +86,8 @@ define('urls',
carrier: user.get_setting('carrier') || '',
//scr: caps.widescreen() ? 'wide' : 'mobile',
//tch: caps.touch,
dev: _device(),
dev: _dev(),
device: _device(),
pro: buckets.get_profile()
};
if (user.logged_in()) {
Expand Down

0 comments on commit c760e1b

Please sign in to comment.