Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tsi1-backend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Rodrigo Sastre Marotta
tsi1-backend
Merge requests
!47
Feature/bedelia login
Code
Review changes
Check out branch
Download
Patches
Plain diff
Expand sidebar
Merged
Feature/bedelia login
feature/bedelia-login
into
develop
Overview
0
Commits
4
Pipelines
0
Changes
1
Merged
Feature/bedelia login
Enzo Santangelo Dodera
requested to merge
feature/bedelia-login
into
develop
Dec 12, 2020
Overview
0
Commits
4
Pipelines
0
Changes
1
0
0
Merge request reports
Viewing commit
20d10b1b
Prev
Next
Show latest version
1 file
+
18
−
0
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
20d10b1b
bedelia
· 20d10b1b
esantangelo
authored
Dec 12, 2020
Bedelia/Controllers/UsersController.cs
+
18
−
0
View file @ 20d10b1b
Edit in single-file editor
Open in Web IDE
Show full file
@@ -135,5 +135,23 @@ namespace Bedelia.Controllers
return
Ok
(
result
);
}
[
HttpPost
(
"login"
)]
public
async
Task
<
IActionResult
>
Login
(
UserLoginDto
userLoginDto
)
{
var
user
=
await
_context
.
Users
.
FirstOrDefaultAsync
(
x
=>
x
.
IdentityCard
==
userLoginDto
.
IdentityCard
);
if
(
user
==
null
)
{
return
BadRequest
(
string
.
Format
(
"el usuario con cédula {0} no existe en bedelia"
,
userLoginDto
.
IdentityCard
));
}
if
(
user
.
Password
!=
userLoginDto
.
Password
)
{
return
BadRequest
(
string
.
Format
(
"Contraseña incorrecta"
));
}
return
Ok
();
}
}
}
Loading