Skip to content

Commit

Permalink
Fix platform properties UI
Browse files Browse the repository at this point in the history
  • Loading branch information
WrathfulSpatula committed Jan 11, 2024
1 parent 1514212 commit 075bd28
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions metriq-api/service/propertyService.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
// It doesn't exactly fit the model-service-controller abstraction paradigm that we use, but maybe we can build a "domain" interface at this level.

// Data Access Layer
const DataTypeService = require('./dataTypeService')
const dataTypeService = new DataTypeService()
const PlatformDataTypeService = require('./platformDataTypeService')
const platformDataTypeService = new PlatformDataTypeService()
const PlatformDataTypeValueService = require('./platformDataTypeValueService')
Expand Down Expand Up @@ -57,6 +59,7 @@ class PropertyService {
}

property.id = platformDataTypeValue.id
property.typeFriendlyName = (await dataTypeService.getByPk(property.dataTypeId)).friendlyName

return { success: true, body: property }
}
Expand Down Expand Up @@ -105,9 +108,8 @@ class PropertyService {
}
const platformId = property.platformId
await property.destroy()
const platform = await platformService.getSanitized(platformId, userId)

return { success: true, body: platform }
return await platformService.getSanitized(platformId, userId)
}
}

Expand Down

0 comments on commit 075bd28

Please sign in to comment.