Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
STORM App
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tb17
STORM App
Commits
76050b83
Commit
76050b83
authored
8 months ago
by
Trivikram Battalapalli
Browse files
Options
Downloads
Patches
Plain Diff
fixed login error
parent
e57fc1b4
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
client/api/api_client.js
+3
-1
3 additions, 1 deletion
client/api/api_client.js
client/api/user_api.js
+1
-0
1 addition, 0 deletions
client/api/user_api.js
client/screens/LoginScreen.js
+4
-1
4 additions, 1 deletion
client/screens/LoginScreen.js
with
8 additions
and
2 deletions
client/api/api_client.js
+
3
−
1
View file @
76050b83
import
axios
from
'
axios
'
;
const
client
=
axios
.
create
({
baseURL
:
'
http://3.139.131.0:5000/api/
'
});
// const client = axios.create({ baseURL: 'http://3.139.131.0:5000/api/' });
const
client
=
axios
.
create
({
baseURL
:
'
http://10.194.199.185:3000/api/
'
});
export
default
client
;
This diff is collapsed.
Click to expand it.
client/api/user_api.js
+
1
−
0
View file @
76050b83
...
...
@@ -15,6 +15,7 @@ export const createUser = async (userData) => {
export
const
loginUser
=
async
(
loginData
)
=>
{
try
{
console
.
log
(
'
sending
'
);
const
response
=
await
client
.
post
(
'
/users/login
'
,
loginData
);
// Send email and password for login
console
.
log
(
response
);
return
handleSuccess
(
response
);
...
...
This diff is collapsed.
Click to expand it.
client/screens/LoginScreen.js
+
4
−
1
View file @
76050b83
...
...
@@ -28,7 +28,10 @@ function LoginScreen({ navigation }) {
const
email_lower
=
email
.
toLowerCase
();
// Call the API to validate login with email and password
console
.
log
(
email_lower
,
password
);
const
response
=
await
loginUser
({
email_lower
,
password
});
const
response
=
await
loginUser
({
email
:
email_lower
,
password
:
password
,
});
const
user
=
response
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment