Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
swing-webapp
api
Commits
fbd66ebd
Commit
fbd66ebd
authored
May 17, 2021
by
antoine masson
Browse files
remove debug
parent
65a3009c
Changes
1
Hide whitespace changes
Inline
Side-by-side
controllers/TokenController.js
View file @
fbd66ebd
...
...
@@ -177,7 +177,7 @@ exports.downCSV_survey_tokens = async (req,res)=>{
// client
exports
.
loginToken
=
async
(
req
,
res
)
=>
{
//
try {
try
{
const
token
=
await
Token
.
findOne
({
token
:
req
.
body
.
token
});
const
gopt
=
await
GlobalOptions
.
findById
(
0
,{
poc
:
1
});
...
...
@@ -212,9 +212,9 @@ exports.loginToken = async (req, res) => {
}
const
authtoken
=
await
token
.
generateAuthToken
();
res
.
status
(
201
).
json
({
token
:
authtoken
,
message
:
"
Succeeded Login
"
,
status
:
"
OK
"
});
//
} catch (err) {
//
res.status(400).json({ message: err,status:"Error"});
//
}
}
catch
(
err
)
{
res
.
status
(
400
).
json
({
message
:
err
,
status
:
"
Error
"
});
}
};
exports
.
accessToken
=
async
(
req
,
res
)
=>
{
if
(
await
Survey
.
isAccessToken
(
req
.
body
.
survey_id
)){
...
...
Write
Preview
Supports
Markdown
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