Skip to content

Commit

Permalink
fix: tvoc parameter not included in served weather data
Browse files Browse the repository at this point in the history
  • Loading branch information
lihini committed Jan 18, 2024
1 parent a142c5a commit 04efda3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/modules/weather-data/dto/get-weather-datum.dto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,7 @@ export class GetWeatherDatumDto {

@Prop()
readonly percentage_light_intensity: number;

@Prop()
readonly tvoc: number;
}
3 changes: 2 additions & 1 deletion src/modules/weather-data/weather-data.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ export class WeatherDataService {
* @param {any} datum - The weather datum object to be transformed.
* @returns {any} - The transformed weather datum object.
*/
transformWeatherDatum(datum) {
transformWeatherDatum(datum): GetWeatherDatumDto {
return {
_id: datum._id,
author_user_id: datum.metadata?.author_user_id,
Expand All @@ -179,6 +179,7 @@ export class WeatherDataService {
precipitation: datum.precipitation,
solar_irradiance: datum.solar_irradiance,
percentage_light_intensity: datum.percentage_light_intensity,
tvoc: datum.tvoc,
};
}

Expand Down

0 comments on commit 04efda3

Please sign in to comment.