Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Jay Mehta
/
strapi-setup-file
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Registry
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit 48ccf126
authored
2022-11-30 11:24:11 +0530
by
kashif ansari
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
internal server error issue fix while entering wrong OTP
1 parent
17329f21
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
10 deletions
src/api/end-user/controllers/end-user.js
src/api/end-user/controllers/end-user.js
View file @
48ccf12
...
...
@@ -5,8 +5,11 @@
*/
const
{
factories
}
=
require
(
"@strapi/strapi"
);
const
{
getService
}
=
require
(
"@strapi/plugin-users-permissions/server/utils"
);
const
{
getService
}
=
require
(
"@strapi/plugin-users-permissions/server/utils"
);
const
utils
=
require
(
"@strapi/utils"
);
const
{
sanitize
}
=
utils
;
const
{
ValidationError
}
=
utils
.
errors
;
module
.
exports
=
factories
.
createCoreController
(
"api::end-user.end-user"
,
({
strapi
:
Strapi
})
=>
({
...
...
@@ -191,9 +194,12 @@ module.exports = factories.createCoreController(
ctx
.
request
.
body
.
data
.
httpRequestEmailHeaders
=
JSON
.
stringify
(
spretoOTP
.
spertoEmailResponse
.
headers
);
ctx
.
request
.
body
.
data
.
httpRequestEmailMethod
=
spretoOTP
.
spertoEmailResponse
.
config
.
method
;
ctx
.
request
.
body
.
data
.
httpRequestEmailUrl
=
spretoOTP
.
spertoEmailResponse
.
config
.
url
;
ctx
.
request
.
body
.
data
.
httpsRequestEmailBody
=
spretoOTP
.
spertoEmailResponse
.
config
.
data
;
ctx
.
request
.
body
.
data
.
httpRequestEmailMethod
=
spretoOTP
.
spertoEmailResponse
.
config
.
method
;
ctx
.
request
.
body
.
data
.
httpRequestEmailUrl
=
spretoOTP
.
spertoEmailResponse
.
config
.
url
;
ctx
.
request
.
body
.
data
.
httpsRequestEmailBody
=
spretoOTP
.
spertoEmailResponse
.
config
.
data
;
ctx
.
request
.
body
.
data
.
httpResposneEmailBody
=
JSON
.
stringify
(
spretoOTP
.
spertoEmailResponse
.
data
);
...
...
@@ -201,16 +207,16 @@ module.exports = factories.createCoreController(
ctx
.
request
.
body
.
data
.
httpSMSRequestHeaders
=
JSON
.
stringify
(
spretoOTP
.
spertoEmailResponse
.
headers
);
ctx
.
request
.
body
.
data
.
httpSMSRequestMethod
=
spretoOTP
.
spertoEmailResponse
.
config
.
method
;
ctx
.
request
.
body
.
data
.
httpSMSRequestUrl
=
spretoOTP
.
spertoEmailResponse
.
config
.
url
;
ctx
.
request
.
body
.
data
.
httpsSMSRequestBody
=
spretoOTP
.
spertoEmailResponse
.
config
.
data
;
ctx
.
request
.
body
.
data
.
httpSMSRequestMethod
=
spretoOTP
.
spertoEmailResponse
.
config
.
method
;
ctx
.
request
.
body
.
data
.
httpSMSRequestUrl
=
spretoOTP
.
spertoEmailResponse
.
config
.
url
;
ctx
.
request
.
body
.
data
.
httpsSMSRequestBody
=
spretoOTP
.
spertoEmailResponse
.
config
.
data
;
ctx
.
request
.
body
.
data
.
httpSMSResposneBody
=
JSON
.
stringify
(
spretoOTP
.
spertoEmailResponse
.
data
);
ctx
.
request
.
body
.
data
.
thirdPartyApiError
=
false
;
}
catch
(
error
)
{
ctx
.
request
.
body
.
data
.
httpRequestEmailHeaders
=
JSON
.
stringify
(
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
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 post a comment