|
@@ -8,8 +8,8 @@ type ServeSetting = {
|
|
pose?: string;
|
|
pose?: string;
|
|
cover?: string;
|
|
cover?: string;
|
|
mapType?: 'satellite' | 'standard',
|
|
mapType?: 'satellite' | 'standard',
|
|
- back?: string;
|
|
|
|
- mapId?: number
|
|
|
|
|
|
+ back?: string | null;
|
|
|
|
+ mapId?: number | null
|
|
};
|
|
};
|
|
|
|
|
|
export type Setting = {
|
|
export type Setting = {
|
|
@@ -36,17 +36,17 @@ const toLocal = (serviceSetting: ServeSetting): Setting => ({
|
|
id: serviceSetting.settingsId,
|
|
id: serviceSetting.settingsId,
|
|
pose: serviceSetting.pose && JSON.parse(serviceSetting.pose),
|
|
pose: serviceSetting.pose && JSON.parse(serviceSetting.pose),
|
|
cover: serviceSetting.cover || defaultCover,
|
|
cover: serviceSetting.cover || defaultCover,
|
|
- back: serviceSetting.back || "map",
|
|
|
|
|
|
+ back: serviceSetting.back || undefined,
|
|
mapType: serviceSetting.mapType || 'satellite',
|
|
mapType: serviceSetting.mapType || 'satellite',
|
|
- mapId: serviceSetting.mapId,
|
|
|
|
|
|
+ mapId: serviceSetting.mapId || undefined,
|
|
});
|
|
});
|
|
|
|
|
|
const toService = (setting: Setting): ServeSetting => ({
|
|
const toService = (setting: Setting): ServeSetting => ({
|
|
settingsId: setting.id,
|
|
settingsId: setting.id,
|
|
- mapId: setting.mapId,
|
|
|
|
|
|
+ mapId: setting.mapId || null,
|
|
pose: setting.pose && JSON.stringify(setting.pose),
|
|
pose: setting.pose && JSON.stringify(setting.pose),
|
|
cover: setting.cover,
|
|
cover: setting.cover,
|
|
- back: setting.back,
|
|
|
|
|
|
+ back: setting.back || null,
|
|
mapType: setting.mapType,
|
|
mapType: setting.mapType,
|
|
});
|
|
});
|
|
|
|
|