Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
eResearch
sails-hook-redbox-labarchives
Commits
35855468
Commit
35855468
authored
Jun 26, 2019
by
Moises Sacal
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixes eresearch/rdm#999
parent
5a4b09b4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
5 deletions
+15
-5
api/controllers/LabarchivesController.js
api/controllers/LabarchivesController.js
+7
-1
package.json
package.json
+1
-1
typescript/api/controllers/LabarchivesController.ts
typescript/api/controllers/LabarchivesController.ts
+7
-3
No files found.
api/controllers/LabarchivesController.js
View file @
35855468
...
...
@@ -70,7 +70,13 @@ var Controllers;
let
info
=
{};
return
WorkspaceService
.
workspaceAppFromUserId
(
userId
,
this
.
config
.
appName
)
.
flatMap
(
response
=>
{
const
user
=
response
[
'
info
'
]
||
null
;
let
user
=
null
;
if
(
!
response
)
{
user
=
null
;
}
else
{
user
=
response
[
'
info
'
]
||
null
;
}
if
(
user
)
{
const
userInfo
=
LabarchivesService
.
userInfo
(
this
.
config
.
key
,
user
[
'
id
'
],
true
);
return
rxjs_1
.
Observable
.
fromPromise
(
userInfo
);
...
...
package.json
View file @
35855468
{
"name"
:
"sails-hook-redbox-labarchives"
,
"version"
:
"1.0.
0
"
,
"version"
:
"1.0.
1
"
,
"description"
:
"A Sails Hook for LabArchives"
,
"main"
:
"index.js"
,
"sails"
:
{
...
...
typescript/api/controllers/LabarchivesController.ts
View file @
35855468
...
...
@@ -75,8 +75,7 @@ export module Controllers {
sails
.
log
.
error
(
error
);
this
.
ajaxFail
(
req
,
res
,
errorMessage
,
{
status
:
false
,
message
:
errorMessage
});
});
}
else
{
}
else
{
const
message
=
'
Input username and password
'
;
this
.
ajaxFail
(
req
,
res
,
message
,
{
status
:
false
,
message
:
message
});
}
...
...
@@ -89,7 +88,12 @@ export module Controllers {
let
info
=
{};
return
WorkspaceService
.
workspaceAppFromUserId
(
userId
,
this
.
config
.
appName
)
.
flatMap
(
response
=>
{
const
user
=
response
[
'
info
'
]
||
null
;
let
user
=
null
;
if
(
!
response
)
{
user
=
null
;
}
else
{
user
=
response
[
'
info
'
]
||
null
;
}
if
(
user
)
{
const
userInfo
=
LabarchivesService
.
userInfo
(
this
.
config
.
key
,
user
[
'
id
'
],
true
);
return
Observable
.
fromPromise
(
userInfo
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment