public async Task <IActionResult> CreateShareKey([FromBody] CreateShareKeyRequest request,
                                                         [FromRoute] Guid carId)
        {
            var result = await _shareCarService.CreateShareKeyAsync(carId, HttpContext.GetUserId(), request.Role);

            return(GenerateResponse(result));
        }
Exemple #2
0
        public async Task <ServiceResult <CreateShareKeyResponse> > GetShareKeyAsync(string carId, CreateShareKeyRequest request)
        {
            var uri = string.Format(CreateShareKeyUrl, carId);

            return(await _requestSenderService.SendAuthPostRequestAsync <CreateShareKeyResponse>(uri, request));
        }