public async Task <IActionResult> SetUserBasicProgramPinToDock(SetUserBasicProgramPinToDockDTO pinToDockDTO)
        {
            var userId = this.HttpContext.User?.Identity?.Name ?? throw new AuthenticationException();
            var result = await this.basicProgramDataService.SetUserBasicProgramPinToDock(userId, pinToDockDTO.ProgramId, pinToDockDTO.PinToDock);

            return(result ? this.Ok(result) : this.BadRequest(result));
        }
Exemple #2
0
        public async Task <bool> SetUserBasicProgramPinToDock(SetUserBasicProgramPinToDockDTO pinToDockDTO)
        {
            await this.AddAuthorizationHeaderAsync();

            var response = await this.httpClient.PutAsJsonAsync("api/basicprogram/SetUserBasicProgramPinToDock", pinToDockDTO);

            response.EnsureSuccessStatusCode();
            return(response.IsSuccessStatusCode);
        }