Skip to content

Commit ce4449d

Browse files
authored
Merge pull request #683 from bcgov/yj
chore: action result with type
2 parents 7cd53ef + 0b9cc2b commit ce4449d

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

server/StrDss.Api/Controllers/OrganizationsController.cs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,17 +81,23 @@ public async Task<ActionResult<StrRequirementsDto>> GetStrRequirements(double lo
8181

8282
[ApiAuthorize()]
8383
[HttpGet("platforms")]
84-
public async Task<ActionResult> GetPlatforms(int pageSize = 10, int pageNumber = 1, string orderBy = "OrganizationNm", string direction = "asc")
84+
public async Task<ActionResult<List<PlatformViewDto>>> GetPlatforms(int pageSize = 10, int pageNumber = 1, string orderBy = "OrganizationNm", string direction = "asc")
8585
{
8686
var platforms = await _orgService.GetPlatforms(pageSize, pageNumber, orderBy, direction);
8787
return Ok(platforms);
8888
}
8989

9090
[ApiAuthorize()]
9191
[HttpGet("platforms/{id}")]
92-
public async Task<ActionResult> GetPlatform(long id)
92+
public async Task<ActionResult<PlatformViewDto>> GetPlatform(long id)
9393
{
9494
var platform = await _orgService.GetPlatform(id);
95+
96+
if (platform == null)
97+
{
98+
return NotFound();
99+
}
100+
95101
return Ok(platform);
96102
}
97103
}

0 commit comments

Comments
 (0)