Skip to content
This repository was archived by the owner on Oct 5, 2020. It is now read-only.

Commit d33017f

Browse files
authored
Merge pull request #535 from grtjn/522-user-status
Fixed #522, fixed #529: typo in auth calculation
2 parents 203769e + 216d197 commit d33017f

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

app/templates/node-server/routes.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,8 @@ router.get('/user/status', function(req, res) {
4545
));
4646
}
4747
} else {
48-
var queryString = req.originalUrl.split('?')[1];
49-
var path = req.baseUrl + req.path + (queryString ? '?' + queryString : '');
5048
var passportUser = req.session.passport.user;
49+
var path = '/v1/documents?uri=/api/users/' + passportUser.username + '.json';
5150
var reqOptions = {
5251
hostname: options.mlHost,
5352
port: options.mlHttpPort,
@@ -71,7 +70,7 @@ router.get('/user/status', function(req, res) {
7170
var profile = httpClient.get({
7271
hostname: options.mlHost,
7372
port: options.mlHttpPort,
74-
path: '/v1/documents?uri=/api/users/' + passportUser.username + '.json',
73+
path: path,
7574
headers: headers,
7675
ca: ca
7776
}, function(response) {

0 commit comments

Comments
 (0)