Пример #1
0
        public async Task <IActionResult> LoadHistoryVersionsAsync(
            [FromRoute] string organisationId,
            [FromRoute] string teamId,
            [FromRoute] string appId,
            [FromRoute] string keyBranchName,
            [FromServices] IVersionService service)
        {
            if (string.IsNullOrWhiteSpace(organisationId) || string.IsNullOrWhiteSpace(teamId) || string.IsNullOrWhiteSpace(appId) || string.IsNullOrWhiteSpace(keyBranchName))
            {
                return(BadRequest(new { reason = $"Invalid parameters!" }));
            }

            var result = await service.LoadHistoryFromKeyBranchName(organisationId, teamId, appId, keyBranchName);

            if (result == null)
            {
                return(NotFound());
            }
            return(Ok(result));
        }