diff --git a/front/API.ts b/front/API.ts index 39d54d6..68037ca 100644 --- a/front/API.ts +++ b/front/API.ts @@ -151,6 +151,7 @@ export default class API { name: (user.username ?? user.name) as string, email: user.email as string, premium: false, + googleID: user.googleID as string, isGuest: user.isGuest as boolean, data: { gamesPlayed: user.partyPlayed as number, @@ -232,16 +233,16 @@ export default class API { // To be fixed with #168 // eslint-disable-next-line @typescript-eslint/no-explicit-any (song: any) => - ({ - id: song.id as number, - name: song.name as string, - artistId: song.artistId as number, - albumId: song.albumId as number, - genreId: song.genreId as number, - details: song.difficulties, - cover: `${baseAPIUrl}/song/${song.id}/illustration`, - metrics: {}, - } as Song) + ({ + id: song.id as number, + name: song.name as string, + artistId: song.artistId as number, + albumId: song.albumId as number, + genreId: song.genreId as number, + details: song.difficulties, + cover: `${baseAPIUrl}/song/${song.id}/illustration`, + metrics: {}, + } as Song) ); }, }; @@ -474,13 +475,13 @@ export default class API { // To be fixed with #168 // eslint-disable-next-line @typescript-eslint/no-explicit-any (e: any) => - ({ - id: e.id, - query: e.query, - type: e.type, - userId: e.userId, - timestamp: new Date(e.searchDate), - } as SearchHistory) + ({ + id: e.id, + query: e.query, + type: e.type, + userId: e.userId, + timestamp: new Date(e.searchDate), + } as SearchHistory) ) ), }; diff --git a/front/models/User.ts b/front/models/User.ts index 8543fb9..f212ffd 100644 --- a/front/models/User.ts +++ b/front/models/User.ts @@ -5,6 +5,7 @@ import UserSettings from './UserSettings'; interface User extends Model { name: string; email: string; + googleID: string; isGuest: boolean; premium: boolean; data: UserData; diff --git a/front/views/settings/SettingsProfileView.tsx b/front/views/settings/SettingsProfileView.tsx index 4a0b40c..5e9c244 100644 --- a/front/views/settings/SettingsProfileView.tsx +++ b/front/views/settings/SettingsProfileView.tsx @@ -87,6 +87,17 @@ const ProfileSettings = ({ navigation }: { navigation: any }) => { text: user.id.toString(), }, }, + { + type: 'text', + title: 'Google Account', + data: { + text: user.googleID ? "Linked" : "Not linked" + }, + // type: 'custom', + // data: user.googleID + // ? + // : , + }, { type: 'text', title: translate('nbGamesPlayed'),