fix(utils): medusa internal service returned data should match typings (#12715)

FIXES SUP-1824

**What**
The medusa internal service update should always return the data in the expected shape described by the interface. The medusa service should not have to handle the reshapre
This commit is contained in:
Adrien de Peretti
2025-06-12 17:55:49 +02:00
committed by GitHub
parent ea0b297b44
commit ab634a14ba
9 changed files with 94 additions and 25 deletions

View File

@@ -129,7 +129,7 @@ export default class AuthModuleService
populate: true,
})
return Array.isArray(data) ? serializedUsers : serializedUsers[0]
return serializedUsers
}
async register(
@@ -206,7 +206,7 @@ export default class AuthModuleService
AuthTypes.ProviderIdentityDTO[]
>(updatedProviders)
return Array.isArray(data) ? serializedProviders : serializedProviders[0]
return serializedProviders
}
async updateProvider(