public IHttpActionResult UpdateById([FromBody] UserUpdateDetails updateDetails) { Guid authenticatedUserId = ClaimsHelper.GetUserIdFromClaims(); var user = _context.Users.UpdateById(authenticatedUserId, updateDetails); return(Ok(ConvertToServiceLayerUser(user))); }
public IHttpActionResult UpdatePasswordById([FromBody] Service.PasswordUpdate passwordUpdate) { Guid authenticatedUserId = ClaimsHelper.GetUserIdFromClaims(); var user = _context.Users.UpdatePasswordById(authenticatedUserId, passwordUpdate.Password); return(Ok(ConvertToServiceLayerUser(user))); }
public Service.User GetCurrentUser() { Guid authenticatedUserId = ClaimsHelper.GetUserIdFromClaims(); var user = _context.Users.GetById(authenticatedUserId); return(ConvertToServiceLayerUser(user)); }
public IHttpActionResult DeleteById(Guid id) { Guid authenticatedUserId = ClaimsHelper.GetUserIdFromClaims(); _context.Projects.DeleteById(id, authenticatedUserId); return(Ok()); }
public IHttpActionResult DeleteById() { Guid authenticatedUserId = ClaimsHelper.GetUserIdFromClaims(); _context.Users.DeleteById(authenticatedUserId); return(Ok()); }
public bool IsLoggedIn() { try { Guid authenticatedUserId = ClaimsHelper.GetUserIdFromClaims(); return(true); } catch (Exception) { return(false); } }
public Translation Add([FromBody] Translation translation) { Guid authenticatedUserId = ClaimsHelper.GetUserIdFromClaims(); return(_context.Translations.Add(translation, authenticatedUserId)); }
public Vote UpdateById(Guid translationId, [FromBody] Vote vote) { Guid authenticatedUserId = ClaimsHelper.GetUserIdFromClaims(); return(_context.Votes.UpdateById(translationId, vote, authenticatedUserId)); }
public void DeleteById(Guid translationId) { Guid authenticatedUserId = ClaimsHelper.GetUserIdFromClaims(); _context.Votes.DeleteById(translationId, authenticatedUserId); }
public Vote GetCurrentUserVoteByTranslationId(Guid translationId) { Guid authenticatedUserId = ClaimsHelper.GetUserIdFromClaims(); return(_context.Votes.GetById(authenticatedUserId, translationId)); }
public Vote Add([FromBody] Vote vote) { Guid authenticatedUserId = ClaimsHelper.GetUserIdFromClaims(); return(_context.Votes.Add(vote, authenticatedUserId)); }
public IHttpActionResult UpdateById(Guid id, [FromBody] Project project) { Guid authenticatedUserId = ClaimsHelper.GetUserIdFromClaims(); return(Ok(_context.Projects.UpdateById(id, project, authenticatedUserId))); }
public string GetRole(Guid id) { Guid authenticatedUserId = ClaimsHelper.GetUserIdFromClaims(); return(_context.Translations.GetRole(id, authenticatedUserId)); }
public IHttpActionResult Add([FromBody] Project project) { Guid authenticatedUserId = ClaimsHelper.GetUserIdFromClaims(); return(Ok(_context.Projects.Add(project, authenticatedUserId))); }
public Translation UpdateById(Guid id, [FromBody] Translation translation) { Guid authenticatedUserId = ClaimsHelper.GetUserIdFromClaims(); return(_context.Translations.UpdateById(id, translation, authenticatedUserId)); }
public void DeleteById(Guid id) { Guid authenticatedUserId = ClaimsHelper.GetUserIdFromClaims(); _context.Translations.DeleteById(id, authenticatedUserId); }
public IHttpActionResult Add([FromBody] Phrase phrase) { Guid authenticatedUserId = ClaimsHelper.GetUserIdFromClaims(); return(Ok(_context.Phrases.Add(phrase, authenticatedUserId))); }
public IHttpActionResult UpdateById(Guid id, [FromBody] Phrase phrase) { Guid authenticatedUserId = ClaimsHelper.GetUserIdFromClaims(); return(Ok(_context.Phrases.UpdateById(id, phrase, authenticatedUserId))); }