Skip to content

Commit 1ed32cb

Browse files
committed
refactor: drop fields that will no longer be stored in the user entity
1 parent 0ee5639 commit 1ed32cb

File tree

3 files changed

+0
-39
lines changed

3 files changed

+0
-39
lines changed

server/src/user/entity/user.entity.ts

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -70,24 +70,6 @@ export class User {
7070

7171
@Prop({ type: Boolean, required: true, default: true })
7272
prefersDarkTheme: boolean;
73-
74-
@Prop({ type: Array, required: true, default: [] })
75-
likedSongs: string[];
76-
77-
@Prop({ type: Array, required: true, default: [] })
78-
following: string[];
79-
80-
@Prop({ type: Array, required: true, default: [] })
81-
likedComments: string[];
82-
83-
@Prop({ type: Array, required: true, default: [] })
84-
dislikedComments: string[];
85-
86-
@Prop({ type: Array, required: true, default: [] })
87-
notifications: string[];
88-
89-
@Prop({ type: Array, required: true, default: [] })
90-
achievements: string[];
9173
}
9274

9375
export const UserSchema = SchemaFactory.createForClass(User);

web/src/modules/auth/types/User.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,6 @@ export type LoggedUserData = {
1818
creationDate: string;
1919
lastEdited: string;
2020
lastLogin: string;
21-
likedSongs: string[]; // Assuming the array contains strings
22-
following: string[]; // Assuming the array contains strings
23-
likedComments: string[]; // Assuming the array contains strings
24-
dislikedComments: string[]; // Assuming the array contains strings
25-
notifications: string[]; // Assuming the array contains strings
26-
achievements: string[]; // Assuming the array contains strings
2721
createdAt: string;
2822
updatedAt: string;
2923
id: string;
@@ -60,7 +54,4 @@ export type UserProfileData = {
6054
description: string;
6155
profileImage: string;
6256
socialLinks: SocialLinks;
63-
likedSongs: string[];
64-
following: string[];
65-
achievements: string[];
6657
};

web/src/modules/user/components/UserProfile.tsx

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,6 @@ const UserProfile = ({ userData }: UserProfileProps) => {
1515
description,
1616
profileImage,
1717
socialLinks,
18-
likedSongs,
19-
following,
20-
achievements,
2118
} = userData;
2219

2320
return (
@@ -34,7 +31,6 @@ const UserProfile = ({ userData }: UserProfileProps) => {
3431
<p className='text-gray-500'>Last Login: {lastLogin.toLocaleString()}</p>
3532
<p className='text-gray-500'>Login Streak: {loginStreak}</p>
3633
<p className='text-gray-500'>Play Count: {playCount}</p>
37-
<p className='text-gray-500'>Following: {following}</p>
3834
<ul className='mt-4'>
3935
{Object.keys(socialLinks).map((key, index) => {
4036
const link = socialLinks[key as SocialLinksTypes];
@@ -49,14 +45,6 @@ const UserProfile = ({ userData }: UserProfileProps) => {
4945
);
5046
})}
5147
</ul>
52-
<ul></ul>
53-
<ul className='mt-4'>
54-
{achievements.map((achievement, index) => (
55-
<li key={index} className='text-gray-500'>
56-
{achievement}
57-
</li>
58-
))}
59-
</ul>
6048
</section>
6149
);
6250
};

0 commit comments

Comments
 (0)