diff --git a/CHANGELOG.md b/CHANGELOG.md index 619af8173..5da67db52 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed - Decreased the rate limiter duration of queue jobs from 5 to 4 seconds +- Removed the alias from the `User` database schema ### Fixed diff --git a/apps/api/src/app/auth/web-auth.service.ts b/apps/api/src/app/auth/web-auth.service.ts index 9212a2e07..bbfddb673 100644 --- a/apps/api/src/app/auth/web-auth.service.ts +++ b/apps/api/src/app/auth/web-auth.service.ts @@ -54,7 +54,7 @@ export class WebAuthService { rpName: 'Ghostfolio', rpID: this.rpID, userID: user.id, - userName: user.alias, + userName: '', timeout: 60000, attestationType: 'indirect', authenticatorSelection: { diff --git a/apps/api/src/app/user/user.service.ts b/apps/api/src/app/user/user.service.ts index 57e3ba80d..49159532b 100644 --- a/apps/api/src/app/user/user.service.ts +++ b/apps/api/src/app/user/user.service.ts @@ -43,7 +43,7 @@ export class UserService { include: { User: true }, - orderBy: { User: { alias: 'asc' } }, + orderBy: { alias: 'asc' }, where: { GranteeUser: { id } } }); let tags = await this.tagService.getByUser(id); @@ -98,7 +98,6 @@ export class UserService { const { accessToken, Account, - alias, authChallenge, createdAt, id, @@ -116,7 +115,6 @@ export class UserService { const user: UserWithSettings = { accessToken, Account, - alias, authChallenge, createdAt, id, diff --git a/prisma/migrations/20220903065048_removed_alias_from_user/migration.sql b/prisma/migrations/20220903065048_removed_alias_from_user/migration.sql new file mode 100644 index 000000000..04e3c4d71 --- /dev/null +++ b/prisma/migrations/20220903065048_removed_alias_from_user/migration.sql @@ -0,0 +1,2 @@ +-- AlterTable +ALTER TABLE "User" DROP COLUMN "alias"; diff --git a/prisma/schema.prisma b/prisma/schema.prisma index ad4d163c6..507570eba 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -160,7 +160,6 @@ model Tag { model User { accessToken String? - alias String? authChallenge String? createdAt DateTime @default(now()) id String @id @default(uuid()) diff --git a/prisma/seed.js b/prisma/seed.js index d33d8b581..72a87259f 100644 --- a/prisma/seed.js +++ b/prisma/seed.js @@ -111,7 +111,6 @@ async function main() { } ] }, - alias: 'Demo', id: '9b112b4d-3b7d-4bad-9bdd-3b0f7b4dac2f', role: Role.DEMO },