mirror of
https://github.com/Unleash/unleash.git
synced 2025-09-01 13:47:27 +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 mapToDb = (client: INewClientInstance) => {
|
||||||
const initialMap = {
|
const mapped = {
|
||||||
app_name: client.appName,
|
app_name: client.appName,
|
||||||
instance_id: client.instanceId,
|
instance_id: client.instanceId,
|
||||||
sdk_version: client.sdkVersion,
|
sdk_version: client.sdkVersion,
|
||||||
@ -43,14 +43,14 @@ const mapToDb = (client: INewClientInstance) => {
|
|||||||
environment: client.environment,
|
environment: client.environment,
|
||||||
};
|
};
|
||||||
|
|
||||||
Object.keys(initialMap).forEach((k) => {
|
Object.keys(mapped).forEach((k) => {
|
||||||
if (initialMap[k] === undefined) {
|
if (mapped[k] === undefined) {
|
||||||
// not using !temp[k] to allow false and null values to get through
|
// 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 {
|
export default class ClientInstanceStore implements IClientInstanceStore {
|
||||||
|
Loading…
Reference in New Issue
Block a user