diff --git a/pollor.Server/.env.example b/pollor.Server/.env.example index 18cdb12..4a03aaa 100644 --- a/pollor.Server/.env.example +++ b/pollor.Server/.env.example @@ -1,5 +1,7 @@ ACCEPTED_CORS_DOMAINS=https://127.0.0.1:4200,https://localhost:4200 DB_SERVER=localhost\MSSQLSERVERx DB_NAME=name +DB_UID= +DB_PASSWORD= DB_INTEGRATEDSECURITY=True DB_TRUSTSERVERCERT=True \ No newline at end of file diff --git a/pollor.Server/Services/DBConnection.cs b/pollor.Server/Services/DBConnection.cs index 6bd4ce0..174bb30 100644 --- a/pollor.Server/Services/DBConnection.cs +++ b/pollor.Server/Services/DBConnection.cs @@ -13,10 +13,13 @@ private DBConnection() { string dbServer = Environment.GetEnvironmentVariable("DB_SERVER")!; string dbName = Environment.GetEnvironmentVariable("DB_NAME")!; + string dbUID = Environment.GetEnvironmentVariable("DB_UID")!; + string dbPassword = Environment.GetEnvironmentVariable("DB_PASSWORD")!; string dbIntegratedSecurity = Environment.GetEnvironmentVariable("DB_INTEGRATEDSECURITY")!; string dbTrustServerCertificate = Environment.GetEnvironmentVariable("DB_TRUSTSERVERCERT")!; - connectionString = string.Format("Server={0};Initial Catalog={1};Integrated Security={2};TrustServerCertificate={3}", dbServer, dbName, dbIntegratedSecurity, dbTrustServerCertificate); + //connectionString = string.Format("Server={0};Initial Catalog={1};Integrated Security={2};TrustServerCertificate={3}", dbServer, dbName, dbIntegratedSecurity, dbTrustServerCertificate); + connectionString = string.Format("Server={0};Database={1};UID={2};PWD={3};Integrated Security={4};TrustServerCertificate={5}", dbServer, dbName, dbUID, dbPassword, dbIntegratedSecurity, dbTrustServerCertificate); } public static DBConnection Instance() diff --git a/pollor.client/src/app/polls/component/polls.component.html b/pollor.client/src/app/polls/component/polls.component.html index b42b6c7..1c87be4 100644 --- a/pollor.client/src/app/polls/component/polls.component.html +++ b/pollor.client/src/app/polls/component/polls.component.html @@ -2,9 +2,11 @@

Polls

-

Loading POLLS...

+

Loading POLLS...

- +

no poll data found

+ +
@@ -28,9 +30,11 @@

Polls

All unsorted Answers

-

Loading ANSWERS...

+

Loading ANSWERS...

+ +

no ANSWERS found in database...

-
Poll id
+
@@ -53,9 +57,12 @@

All unsorted Answers

All unsorted Votes

-

Loading VOTES...

+

Loading VOTES...

+ +

no VOTES found in database...

+ -
Answers id
+
diff --git a/pollor.client/src/app/polls/component/polls.component.ts b/pollor.client/src/app/polls/component/polls.component.ts index d3b86bd..b76da74 100644 --- a/pollor.client/src/app/polls/component/polls.component.ts +++ b/pollor.client/src/app/polls/component/polls.component.ts @@ -21,7 +21,6 @@ export class PollsComponent { this.getPolls(); this.getAnswers(); this.getVotes(); - } getPolls() {
Vote id