mirror of
https://github.com/Unleash/unleash.git
synced 2025-08-27 13:49:10 +02:00
rename
This commit is contained in:
parent
2e0a05d078
commit
de43fba588
@ -33,7 +33,7 @@ const mapRow = (row): IClientInstance => ({
|
||||
});
|
||||
|
||||
const mapToDb = (client: INewClientInstance) => {
|
||||
const initialMap = {
|
||||
const mapped = {
|
||||
app_name: client.appName,
|
||||
instance_id: client.instanceId,
|
||||
sdk_version: client.sdkVersion,
|
||||
@ -43,14 +43,14 @@ const mapToDb = (client: INewClientInstance) => {
|
||||
environment: client.environment,
|
||||
};
|
||||
|
||||
Object.keys(initialMap).forEach((k) => {
|
||||
if (initialMap[k] === undefined) {
|
||||
Object.keys(mapped).forEach((k) => {
|
||||
if (mapped[k] === undefined) {
|
||||
// not using !temp[k] to allow false and null values to get through
|
||||
delete initialMap[k];
|
||||
delete mapped[k];
|
||||
}
|
||||
});
|
||||
|
||||
return initialMap;
|
||||
return mapped;
|
||||
};
|
||||
|
||||
export default class ClientInstanceStore implements IClientInstanceStore {
|
||||
|
Loading…
Reference in New Issue
Block a user