Fetch workspace and user from database (#94)

Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
Charles Bochet
2023-05-04 11:09:06 +02:00
committed by GitHub
parent 1490f986f2
commit 27d5edc031
18 changed files with 353 additions and 50 deletions

View File

@ -50,11 +50,7 @@ export const mapCompany = (company: GraphqlQueryCompany): Company => ({
? {
id: company.account_owner.id,
email: company.account_owner.email,
first_name: company.account_owner.displayName.split(' ').shift() || '',
last_name: company.account_owner.displayName
.split(' ')
.slice(1)
.join(' '),
displayName: company.account_owner.displayName,
}
: undefined,
creationDate: new Date(company.created_at),