diff --git a/packages/metadata-service/src/index.ts b/packages/metadata-service/src/index.ts index b3f310e57..17ef98bc0 100644 --- a/packages/metadata-service/src/index.ts +++ b/packages/metadata-service/src/index.ts @@ -30,7 +30,7 @@ server.get("/health", async () => { }); let program: Program; - +server.get("/favicon.ico", async (req, res) => res.status(204)); server.get<{ Params: { keyToAssetKey: string } }>( "/v1/:keyToAssetKey", async (request, reply) => { @@ -53,10 +53,10 @@ server.get<{ Params: { keyToAssetKey: string } }>( const hotspotType = entityKey.length > 100 ? "MOBILE" : "IOT"; const image = `${SHDW_DRIVE_URL}/${ hotspotType === "MOBILE" - ? record?.mobile_hotspot_info?.is_active + ? record?.mobile_hotspot_info?.isActive ? "mobile-hotspot-active.png" : "mobile-hotspot.png" - : record?.iot_hotspot_info?.is_active + : record?.iot_hotspot_info?.isActive ? "hotspot-active.png" : "hotspot.png" }`; @@ -120,7 +120,7 @@ server.get<{ Params: { eccCompact: string } }>( const digest = animalHash(eccCompact); const image = `${SHDW_DRIVE_URL}/${ - record?.iot_hotspot_info?.is_active ? "hotspot-active.png" : "hotspot.png" + record?.iot_hotspot_info?.isActive ? "hotspot-active.png" : "hotspot.png" }`; return { @@ -152,6 +152,8 @@ function locationAttributes( return []; } + console.log(info.city); + console.log(info.state); return [ { trait_type: `${name}_city`, value: info.city }, { trait_type: `${name}_state`, value: info.state }, diff --git a/packages/metadata-service/src/model.ts b/packages/metadata-service/src/model.ts index c36b5b598..a49a712e6 100644 --- a/packages/metadata-service/src/model.ts +++ b/packages/metadata-service/src/model.ts @@ -58,7 +58,7 @@ export class MobileHotspotInfo extends Model { declare country: string; declare lat: number; declare long: number; - declare is_active: boolean; + declare isActive: boolean; } MobileHotspotInfo.init( { @@ -92,7 +92,7 @@ export class IotHotspotInfo extends Model { declare country: string; declare lat: number; declare long: number; - declare is_active: boolean; + declare isActive: boolean; } IotHotspotInfo.init( {