public async Task <IActionResult> Post(GoogleAuthenticationServiceTemplate template) { GoogleAdto googleAdto = await _googleAuthenticationServiceApplicationService.CreateAsync(_mapper.Map <GoogleAuthenticationServiceTemplate, CreateGoogleAdto>(template)); return(CreatedAtRoute(RouteDictionary.GetGoogleAuthenticationService, new { googleAdto.Id }, _resourceBuilder.Build(_mapper.Map <GoogleAdto, GoogleAuthenticationServiceResource>(googleAdto)))); }
public async Task <IActionResult> Get(Guid id) { GoogleAdto googleAdto = await _googleAuthenticationServiceApplicationService.GetAsync(new GetGoogleAdto { Id = id }); return(Ok(_resourceBuilder.Build(_mapper.Map <GoogleAdto, GoogleAuthenticationServiceResource>(googleAdto)))); }
public async Task <IActionResult> Put( Guid id, GoogleAuthenticationServiceResource resource) { ChangeGoogleAdto changeGoogleAdto = new ChangeGoogleAdto { Id = id, Name = resource.Name, ClientId = resource.ClientId, ClientSecret = resource.ClientSecret, GrantAccessTokenUrl = resource.GrantAccessTokenUrl, ValidateAccessTokenUrl = resource.ValidateAccessTokenUrl, ClientGrantAccessTokenUrl = resource.ClientGrantAccessTokenUrl, Version = resource.Version }; GoogleAdto googleAdto = await _googleAuthenticationServiceApplicationService.ChangeAsync(changeGoogleAdto); return(Ok(_resourceBuilder.Build(_mapper.Map <GoogleAdto, GoogleAuthenticationServiceResource>(googleAdto)))); }