public ProjectBuilderVariablesViewModel ProjectBuilderVariables(Guid projectId) { if (Request.Headers.Authorization == null) { var msg = new HttpResponseMessage(HttpStatusCode.Unauthorized) { Content = new StringContent("Unauthorized access. Please login.") }; throw new HttpResponseException(msg); } #region check login if (this.LoggedInUserId == Guid.Empty) { throw new HttpResponseException(new HttpResponseMessage(HttpStatusCode.Unauthorized) { Content = new StringContent("Unauthorized access. Please login."), }); } #endregion return(_variableProvider.GetProjectBuilderVariables(this.LoggedInUserTenantId)); }