Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
H
HIAST-Clinics
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
almohanad.hafez
HIAST-Clinics
Commits
9bec7b49
Commit
9bec7b49
authored
Aug 21, 2024
by
Almouhannad
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(B) Modify login response
parent
ad5cc854
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
LoginResponse.cs
...Backend/Application/Users/Commands/Login/LoginResponse.cs
+3
-3
No files found.
Clinics.Backend/Application/Users/Commands/Login/LoginResponse.cs
View file @
9bec7b49
...
...
@@ -11,7 +11,7 @@ public class LoginResponse
public
int
Id
{
get
;
set
;
}
public
string
UserName
{
get
;
set
;
}
=
null
!;
public
string
JWT
{
get
;
set
;
}
=
null
!;
public
PersonalInfo
?
PersonalInfo
{
get
;
set
;
}
=
null
;
public
string
FullName
{
get
;
set
;
}
=
null
!
;
public
static
Result
<
LoginResponse
>
GetResponse
(
User
user
,
string
jwt
,
PersonalInfo
?
personalInfo
=
null
)
{
...
...
@@ -25,10 +25,10 @@ public class LoginResponse
{
if
(
user
.
Role
!=
Roles
.
Admin
)
return
Result
.
Failure
<
LoginResponse
>(
IdentityErrors
.
NotFound
);
response
.
PersonalInfo
=
PersonalInfo
.
Create
(
"admin"
,
""
,
""
).
Valu
e
;
response
.
FullName
=
Roles
.
AdminNam
e
;
return
response
;
}
response
.
PersonalInfo
=
personalInfo
;
response
.
FullName
=
personalInfo
.
FullName
;
return
response
;
}
}
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