-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix #137 Type and org info in GET /queue
- Loading branch information
Carlos Romero Brox
committed
May 23, 2013
1 parent
64744fd
commit e78a5ae
Showing
4 changed files
with
20 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,11 +18,15 @@ | |
For those usages not covered by the GNU Affero General Public License | ||
please contact with::[email protected] | ||
*/ | ||
'use strict'; | ||
|
||
var config = require('./config.js'); | ||
function prefixer(prefix) { | ||
'use strict'; | ||
function prefixer(type) { | ||
var prefix = type + ":"; | ||
return function (req, res, next) { | ||
var orgName = config.oauthIdToken || req.param('id_org'); | ||
req.type = type; | ||
req.org = orgName; | ||
req.prefix = (orgName ? orgName + ':' : '') + prefix; | ||
next(); | ||
}; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters