diff --git a/CHANGELOG.md b/CHANGELOG.md index b147fac8..5e613f3b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## Unreleased + +### Changed + +- Removed the alias from the user interface as a preparation to remove it from the `User` database schema + ## 1.169.0 - 14.07.2022 ### Added diff --git a/apps/api/src/app/admin/admin.service.ts b/apps/api/src/app/admin/admin.service.ts index 5e240a47..2d4edc99 100644 --- a/apps/api/src/app/admin/admin.service.ts +++ b/apps/api/src/app/admin/admin.service.ts @@ -1,6 +1,5 @@ import { SubscriptionService } from '@ghostfolio/api/app/subscription/subscription.service'; import { ConfigurationService } from '@ghostfolio/api/services/configuration.service'; -import { DataGatheringService } from '@ghostfolio/api/services/data-gathering.service'; import { ExchangeRateDataService } from '@ghostfolio/api/services/exchange-rate-data.service'; import { MarketDataService } from '@ghostfolio/api/services/market-data.service'; import { PrismaService } from '@ghostfolio/api/services/prisma.service'; @@ -24,7 +23,6 @@ export class AdminService { public constructor( private readonly configurationService: ConfigurationService, - private readonly dataGatheringService: DataGatheringService, private readonly exchangeRateDataService: ExchangeRateDataService, private readonly marketDataService: MarketDataService, private readonly prismaService: PrismaService, @@ -174,7 +172,6 @@ export class AdminService { _count: { select: { Account: true, Order: true } }, - alias: true, Analytics: { select: { activityCount: true, @@ -194,7 +191,7 @@ export class AdminService { }); return usersWithAnalytics.map( - ({ _count, alias, Analytics, createdAt, id, Subscription }) => { + ({ _count, Analytics, createdAt, id, Subscription }) => { const daysSinceRegistration = differenceInDays(new Date(), createdAt) + 1; const engagement = Analytics.activityCount / daysSinceRegistration; @@ -206,7 +203,6 @@ export class AdminService { : undefined; return { - alias, createdAt, engagement, id, diff --git a/apps/api/src/app/user/user.service.ts b/apps/api/src/app/user/user.service.ts index 32716b45..213351ed 100644 --- a/apps/api/src/app/user/user.service.ts +++ b/apps/api/src/app/user/user.service.ts @@ -36,14 +36,7 @@ export class UserService { } public async getUser( - { - Account, - alias, - id, - permissions, - Settings, - subscription - }: UserWithSettings, + { Account, id, permissions, Settings, subscription }: UserWithSettings, aLocale = locale ): Promise { const access = await this.prismaService.access.findMany({ @@ -63,7 +56,6 @@ export class UserService { } return { - alias, id, permissions, subscription, diff --git a/apps/client/src/app/components/admin-users/admin-users.html b/apps/client/src/app/components/admin-users/admin-users.html index 39f778b2..8eef6283 100644 --- a/apps/client/src/app/components/admin-users/admin-users.html +++ b/apps/client/src/app/components/admin-users/admin-users.html @@ -29,11 +29,10 @@
{{ userItem.alias || userItem.id }}{{ userItem.id }} {{ userItem.alias || (userItem.id | slice:0:5) + - '...' }}{{ (userItem.id | slice:0:5) + '...' }} - {{ user.alias }} - Me + Me