From c193db334e5881ee5cbf147d67034d172b85adff Mon Sep 17 00:00:00 2001 From: vyshnavi9099 Date: Tue, 28 Jul 2026 21:00:42 +0530 Subject: [PATCH 1/2] Add API response JSON --- response.json | 1 + 1 file changed, 1 insertion(+) create mode 100644 response.json diff --git a/response.json b/response.json new file mode 100644 index 00000000..3926de6f --- /dev/null +++ b/response.json @@ -0,0 +1 @@ +[{"id":"62a61945fa15f1cd18516a5f","name":"Trip to NYC","icon":null,"targetAmount":800,"targetDate":"2023-12-10T05:00:00Z","balance":0,"created":"2022-06-12T16:57:45.668Z","transactionIds":null,"tagIds":null,"userId":"62a29c15f4605c4c9fa7f306"},{"id":"62a3f62e102e921da1253d34","name":"Trip to London","icon":null,"targetAmount":3500,"targetDate":"2022-08-02T04:00:00Z","balance":753.89,"created":"2022-06-11T01:55:58.236Z","transactionIds":null,"tagIds":null,"userId":"62a29c15f4605c4c9fa7f306"},{"id":"62a3f587102e921da1253d32","name":"House Down Payment","icon":null,"targetAmount":100000,"targetDate":"2025-01-08T05:00:00Z","balance":73501.82,"created":"2022-06-11T01:53:10.857Z","transactionIds":null,"tagIds":null,"userId":"62a29c15f4605c4c9fa7f306"},{"id":"62a3f5e0102e921da1253d33","name":"Tesla Model Y","icon":null,"targetAmount":60000,"targetDate":"2022-09-01T04:00:00Z","balance":43840.02,"created":"2022-06-11T01:54:40.95Z","transactionIds":null,"tagIds":null,"userId":"62a29c15f4605c4c9fa7f306"}] \ No newline at end of file From ed482ff2ac5908eb9f88f0f8a0e5b254637bef39 Mon Sep 17 00:00:00 2001 From: vyshnavi9099 Date: Thu, 30 Jul 2026 21:13:19 +0530 Subject: [PATCH 2/2] Add icon support and tests --- CommBank-Server/CommBank.csproj | 2 +- CommBank-Server/Models/Goal.cs | 1 + CommBank-Server/Program.cs | 2 +- CommBank-Server/Secrets.json | 6 +++--- CommBank.Tests/CommBank.Tests.csproj | 2 +- 5 files changed, 7 insertions(+), 6 deletions(-) diff --git a/CommBank-Server/CommBank.csproj b/CommBank-Server/CommBank.csproj index 983cc882..5d76d035 100644 --- a/CommBank-Server/CommBank.csproj +++ b/CommBank-Server/CommBank.csproj @@ -1,7 +1,7 @@ - net6.0 + net8.0 enable enable CommBank_Server diff --git a/CommBank-Server/Models/Goal.cs b/CommBank-Server/Models/Goal.cs index 77ff1ad5..9af7f54c 100644 --- a/CommBank-Server/Models/Goal.cs +++ b/CommBank-Server/Models/Goal.cs @@ -10,6 +10,7 @@ public class Goal public string? Id { get; set; } public string? Name { get; set; } + public string? Icon { get; set; } public UInt64 TargetAmount { get; set; } = 0; diff --git a/CommBank-Server/Program.cs b/CommBank-Server/Program.cs index a88e560d..5445d649 100644 --- a/CommBank-Server/Program.cs +++ b/CommBank-Server/Program.cs @@ -12,7 +12,7 @@ builder.Configuration.SetBasePath(Directory.GetCurrentDirectory()).AddJsonFile("Secrets.json"); var mongoClient = new MongoClient(builder.Configuration.GetConnectionString("CommBank")); -var mongoDatabase = mongoClient.GetDatabase("CommBank"); +var mongoDatabase = mongoClient.GetDatabase("commbank"); IAccountsService accountsService = new AccountsService(mongoDatabase); IAuthService authService = new AuthService(mongoDatabase); diff --git a/CommBank-Server/Secrets.json b/CommBank-Server/Secrets.json index 0e5bf949..eba473a2 100644 --- a/CommBank-Server/Secrets.json +++ b/CommBank-Server/Secrets.json @@ -1,5 +1,5 @@ -{ +{ "ConnectionStrings": { - "CommBank": "{CONNECTION_STRING}" + "CommBank": "mongodb+srv://hevypersonalmail_db_user:ARSyB0DqeaEaUnJY@cluster0.dmoum1n.mongodb.net/commbank?appName=Cluster0" } -} \ No newline at end of file +} diff --git a/CommBank.Tests/CommBank.Tests.csproj b/CommBank.Tests/CommBank.Tests.csproj index 4d9413f4..3da571e3 100644 --- a/CommBank.Tests/CommBank.Tests.csproj +++ b/CommBank.Tests/CommBank.Tests.csproj @@ -1,7 +1,7 @@ - net6.0 + net8.0 enable enable