1
1
import type Account from '@/models/Account'
2
2
import airtableBase from './airtable.service'
3
3
import { sha256 } from 'js-sha256'
4
+ import type { RecordData } from 'airtable'
4
5
5
6
const TABLE_NAME = 'Account'
6
7
const ACTIVE_VIEW = 'Grid view'
@@ -64,9 +65,9 @@ class AccountService {
64
65
'E-Mail' : account . email ,
65
66
'Password' : hashedPassword , // Store hashed password
66
67
'About' : account . about || '' ,
67
- 'Gender' : account . gender || '' ,
68
+ 'Gender' : account . gender || undefined ,
68
69
'Birthday' : account . birthday && account . birthday instanceof Date ? account . birthday . toISOString ( ) . split ( 'T' ) [ 0 ] : null ,
69
- 'Profile Image ' : account . profileImageUrl || '' ,
70
+ 'Bilder ' : undefined , // No profile images yet
70
71
}
71
72
}
72
73
] ,
@@ -87,7 +88,7 @@ class AccountService {
87
88
about : createdRecord . get ( 'About' ) as string ,
88
89
gender : createdRecord . get ( 'Gender' ) as Account [ 'gender' ] ,
89
90
birthday : createdRecord . get ( 'Birthday' ) ? new Date ( createdRecord . get ( 'Birthday' ) as string ) : undefined ,
90
- profileImageUrl : createdRecord . get ( 'ProfileImageUrl ' ) as string ,
91
+ profileImages : createdRecord . get ( 'Bilder ' ) as string [ ] ,
91
92
}
92
93
resolve ( createdAccount )
93
94
} else {
@@ -119,7 +120,7 @@ class AccountService {
119
120
'About' : account . about || '' ,
120
121
'Gender' : account . gender || '' ,
121
122
'Birthday' : account . birthday ? account . birthday . toISOString ( ) . split ( 'T' ) [ 0 ] : '' ,
122
- 'Profile Image ' : account . profileImageUrl || '' ,
123
+ 'Bilder ' : account . profileImages || '' ,
123
124
}
124
125
}
125
126
] ,
0 commit comments