Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
ProjectsStatusManagement
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
hasan.bahjat
ProjectsStatusManagement
Commits
a95bdaa3
Commit
a95bdaa3
authored
Aug 26, 2024
by
hasan khaddour
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix problem response
parent
0f8a3073
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
APIController.cs
...agement.Presentation/Controllers/ApiBase/APIController.cs
+5
-1
EmployeesController.cs
...Presentation/Controllers/Employees/EmployeesController.cs
+1
-1
No files found.
PSManagement.Presentation/Controllers/ApiBase/APIController.cs
View file @
a95bdaa3
...
@@ -22,7 +22,11 @@ namespace PSManagement.Presentation.Controllers.ApiBase
...
@@ -22,7 +22,11 @@ namespace PSManagement.Presentation.Controllers.ApiBase
}
}
else
else
{
{
return
Problem
(
detail
:
result
.
Errors
.
FirstOrDefault
(),
statusCode
:
StatusCodes
.
Status400BadRequest
);
return
Problem
(
detail
:
result
.
ValidationErrors
.
FirstOrDefault
().
ErrorMessage
,
statusCode
:
StatusCodes
.
Status400BadRequest
,
title
:
result
.
ValidationErrors
.
FirstOrDefault
().
ErrorCode
);
}
}
}
}
...
...
PSManagement.Presentation/Controllers/Employees/EmployeesController.cs
View file @
a95bdaa3
...
@@ -76,7 +76,7 @@ namespace PSManagement.Presentation.Controllers.Employees
...
@@ -76,7 +76,7 @@ namespace PSManagement.Presentation.Controllers.Employees
return
HandleResult
(
_mapper
.
Map
<
Result
<
IEnumerable
<
EmployeeResponse
>>>(
result
));
return
HandleResult
(
_mapper
.
Map
<
Result
<
IEnumerable
<
EmployeeResponse
>>>(
result
));
}
}
[
HttpGet
(
"Departments"
)]
[
HttpGet
(
"
Get
Departments"
)]
public
async
Task
<
IActionResult
>
GetDepartments
()
public
async
Task
<
IActionResult
>
GetDepartments
()
{
{
var
query
=
new
GetDepartmentsQuery
();
var
query
=
new
GetDepartmentsQuery
();
...
...
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