Skip to content

Commit

Permalink
camel case it
Browse files Browse the repository at this point in the history
  • Loading branch information
bryzettler committed Oct 18, 2023
1 parent 9847513 commit 2709c40
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
10 changes: 6 additions & 4 deletions packages/metadata-service/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ server.get("/health", async () => {
});

let program: Program<HeliumEntityManager>;

server.get("/favicon.ico", async (req, res) => res.status(204));
server.get<{ Params: { keyToAssetKey: string } }>(
"/v1/:keyToAssetKey",
async (request, reply) => {
Expand All @@ -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"
}`;
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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 },
Expand Down
4 changes: 2 additions & 2 deletions packages/metadata-service/src/model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(
{
Expand Down Expand Up @@ -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(
{
Expand Down

0 comments on commit 2709c40

Please sign in to comment.