diff --git a/CHANGELOG.md b/CHANGELOG.md
index 61cb9fcd..f51662bd 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -9,7 +9,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed
+- Removed the `isDefault` flag from the `Account` database schema
- Exposed the database index of _Redis_ as an environment variable (`REDIS_DB`)
+- Improved the language localization for German (`de`)
- Upgraded `prisma` from version `5.9.1` to `5.10.2`
## 2.55.0 - 2024-02-22
diff --git a/apps/api/src/app/account/account.controller.ts b/apps/api/src/app/account/account.controller.ts
index 4bee6596..31c2ee76 100644
--- a/apps/api/src/app/account/account.controller.ts
+++ b/apps/api/src/app/account/account.controller.ts
@@ -63,7 +63,7 @@ export class AccountController {
{ Order: true }
);
- if (account?.isDefault || account?.Order.length > 0) {
+ if (!account || account?.Order.length > 0) {
throw new HttpException(
getReasonPhrase(StatusCodes.FORBIDDEN),
StatusCodes.FORBIDDEN
diff --git a/apps/api/src/app/user/user.service.ts b/apps/api/src/app/user/user.service.ts
index 1f9fd0bf..e20dea4a 100644
--- a/apps/api/src/app/user/user.service.ts
+++ b/apps/api/src/app/user/user.service.ts
@@ -1,11 +1,13 @@
import { SubscriptionService } from '@ghostfolio/api/app/subscription/subscription.service';
import { environment } from '@ghostfolio/api/environments/environment';
import { ConfigurationService } from '@ghostfolio/api/services/configuration/configuration.service';
+import { I18nService } from '@ghostfolio/api/services/i18n/i18n.service';
import { PrismaService } from '@ghostfolio/api/services/prisma/prisma.service';
import { PropertyService } from '@ghostfolio/api/services/property/property.service';
import { TagService } from '@ghostfolio/api/services/tag/tag.service';
import {
DEFAULT_CURRENCY,
+ DEFAULT_LANGUAGE_CODE,
PROPERTY_IS_READ_ONLY_MODE,
PROPERTY_SYSTEM_MESSAGE,
locale
@@ -31,6 +33,8 @@ const crypto = require('crypto');
@Injectable()
export class UserService {
+ private i18nService = new I18nService();
+
public constructor(
private readonly configurationService: ConfigurationService,
private readonly prismaService: PrismaService,
@@ -325,8 +329,10 @@ export class UserService {
Account: {
create: {
currency: DEFAULT_CURRENCY,
- isDefault: true,
- name: 'Default Account'
+ name: this.i18nService.getTranslation({
+ id: 'myAccount',
+ languageCode: DEFAULT_LANGUAGE_CODE // TODO
+ })
}
},
Settings: {
diff --git a/apps/client/src/app/components/accounts-table/accounts-table.component.html b/apps/client/src/app/components/accounts-table/accounts-table.component.html
index 47473d30..cd4f139c 100644
--- a/apps/client/src/app/components/accounts-table/accounts-table.component.html
+++ b/apps/client/src/app/components/accounts-table/accounts-table.component.html
@@ -40,12 +40,7 @@
[tooltip]="element.Platform?.name"
[url]="element.Platform?.url"
/>
- {{ element.name }}
- (Default)
+ {{ element.name }}
Total |
@@ -261,7 +256,7 @@