Skip to content

Commit

Permalink
feat: .js -> loader.ts, cleanup loader logic
Browse files Browse the repository at this point in the history
  • Loading branch information
mman committed Oct 17, 2024
1 parent ff905ba commit 97dd460
Show file tree
Hide file tree
Showing 10 changed files with 916 additions and 773 deletions.
2 changes: 1 addition & 1 deletion src/server/admin-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export default (server: Server) => {
// TODO: validate JSON payload
server.isDebugEnabled = req.body.debug
const value = server.isDebugEnabled
server.emit("serverevent", { type: "DEBUG", data: value })
server.emit("loaderevent", { type: "DEBUG", data: value })
res.send(JSON.stringify({ debug: value }))
})

Expand Down
4 changes: 2 additions & 2 deletions src/server/influxdb.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export class InfluxDBBackend {
this.server = server
this.logger = server.getLogger("influxdb")
this.lastWriteTime = Date.now()
this.server.app.on("settingsChanged", () => { this.settingsChanged() })
this.server.on("settingsChanged", () => { this.settingsChanged() })

this.settingsChanged()
}
Expand Down Expand Up @@ -64,7 +64,7 @@ export class InfluxDBBackend {
}
}

async store(portalId: string, name: string, instanceNumber: number, measurement: string, value: number) {
async store(portalId: string, name: string, instanceNumber: string, measurement: string, value: number) {
if (!this.isConnected || value === undefined || value === null) {
return
}
Expand Down
Loading

0 comments on commit 97dd460

Please sign in to comment.