From 00803c06d9c5ab5c15d3216e01d7f50a90cc48ba Mon Sep 17 00:00:00 2001 From: Tharun-TU Date: Fri, 6 Feb 2026 03:50:25 +0530 Subject: [PATCH] Added optional Icon field to Goal model and completed API verification --- CommBank-Server/Models/Goal.cs | 1 + CommBank-Server/Secrets.json | 2 +- CommBank-Server/Services/AccountService.cs | 2 +- CommBank-Server/Services/AuthService.cs | 2 +- CommBank-Server/Services/GoalService.cs | 2 +- CommBank-Server/Services/TagsService.cs | 2 +- CommBank-Server/Services/TransactionsService.cs | 2 +- CommBank-Server/Services/UsersService.cs | 2 +- 8 files changed, 8 insertions(+), 7 deletions(-) diff --git a/CommBank-Server/Models/Goal.cs b/CommBank-Server/Models/Goal.cs index 77ff1ad..b38f057 100644 --- a/CommBank-Server/Models/Goal.cs +++ b/CommBank-Server/Models/Goal.cs @@ -27,4 +27,5 @@ public class Goal [BsonRepresentation(BsonType.ObjectId)] public string? UserId { get; set; } + public string? Icon { get; set; } } \ No newline at end of file diff --git a/CommBank-Server/Secrets.json b/CommBank-Server/Secrets.json index 0e5bf94..4e9146b 100644 --- a/CommBank-Server/Secrets.json +++ b/CommBank-Server/Secrets.json @@ -1,5 +1,5 @@ { "ConnectionStrings": { - "CommBank": "{CONNECTION_STRING}" + "CommBank": "mongodb+srv://rserver_user:server@cluster0.gbyguwy.mongodb.net/?appName=Cluster0" } } \ No newline at end of file diff --git a/CommBank-Server/Services/AccountService.cs b/CommBank-Server/Services/AccountService.cs index 52d1cb9..886af38 100644 --- a/CommBank-Server/Services/AccountService.cs +++ b/CommBank-Server/Services/AccountService.cs @@ -10,7 +10,7 @@ public class AccountsService : IAccountsService public AccountsService(IMongoDatabase mongoDatabase) { - _accountsCollection = mongoDatabase.GetCollection("Accounts"); + _accountsCollection = mongoDatabase.GetCollection("Account"); } public async Task> GetAsync() => diff --git a/CommBank-Server/Services/AuthService.cs b/CommBank-Server/Services/AuthService.cs index c37de8e..0514e9f 100644 --- a/CommBank-Server/Services/AuthService.cs +++ b/CommBank-Server/Services/AuthService.cs @@ -10,7 +10,7 @@ public class AuthService : IAuthService public AuthService(IMongoDatabase mongoDatabase) { - _usersCollection = mongoDatabase.GetCollection("Users"); + _usersCollection = mongoDatabase.GetCollection("User"); } public async Task Login(string email, string password) diff --git a/CommBank-Server/Services/GoalService.cs b/CommBank-Server/Services/GoalService.cs index b0c600a..70a0847 100644 --- a/CommBank-Server/Services/GoalService.cs +++ b/CommBank-Server/Services/GoalService.cs @@ -9,7 +9,7 @@ public class GoalsService : IGoalsService public GoalsService(IMongoDatabase mongoDatabase) { - _goalsCollection = mongoDatabase.GetCollection("Goals"); + _goalsCollection = mongoDatabase.GetCollection("Goal"); } public async Task> GetAsync() => diff --git a/CommBank-Server/Services/TagsService.cs b/CommBank-Server/Services/TagsService.cs index daf8e58..8409601 100644 --- a/CommBank-Server/Services/TagsService.cs +++ b/CommBank-Server/Services/TagsService.cs @@ -10,7 +10,7 @@ public class TagsService : ITagsService public TagsService(IMongoDatabase mongoDatabase) { - _tagsCollection = mongoDatabase.GetCollection("Tags"); + _tagsCollection = mongoDatabase.GetCollection("Tag"); } public async Task> GetAsync() => diff --git a/CommBank-Server/Services/TransactionsService.cs b/CommBank-Server/Services/TransactionsService.cs index 7771846..eb3c653 100644 --- a/CommBank-Server/Services/TransactionsService.cs +++ b/CommBank-Server/Services/TransactionsService.cs @@ -10,7 +10,7 @@ public class TransactionsService : ITransactionsService public TransactionsService(IMongoDatabase mongoDatabase) { - _transactionsCollection = mongoDatabase.GetCollection("Transactions"); + _transactionsCollection = mongoDatabase.GetCollection("Transaction"); } public async Task> GetAsync() => diff --git a/CommBank-Server/Services/UsersService.cs b/CommBank-Server/Services/UsersService.cs index 4c4c32f..382d0c2 100644 --- a/CommBank-Server/Services/UsersService.cs +++ b/CommBank-Server/Services/UsersService.cs @@ -10,7 +10,7 @@ public class UsersService : IUsersService public UsersService(IMongoDatabase mongoDatabase) { - _usersCollection = mongoDatabase.GetCollection("Users"); + _usersCollection = mongoDatabase.GetCollection("User"); } public async Task> GetAsync() =>