Add JSDoc to server/model/*

Signed-off-by: Matthew Nickson <mnickson@sidingsmedia.com>
This commit is contained in:
Matthew Nickson 2022-04-16 21:11:45 +01:00
parent 5a209c74e1
commit 45f44b183d
No known key found for this signature in database
GPG key ID: BF229DCFD4748E05
5 changed files with 96 additions and 6 deletions

View file

@ -13,6 +13,11 @@ const { BeanModel } = require("redbean-node/dist/bean-model");
*/
class Heartbeat extends BeanModel {
/**
* Return a object that ready to parse to JSON for public
* Only show necessary data to public
* @returns {Object}
*/
toPublicJSON() {
return {
status: this.status,
@ -22,6 +27,10 @@ class Heartbeat extends BeanModel {
};
}
/**
* Return a object that ready to parse to JSON
* @returns {Object}
*/
toJSON() {
return {
monitorID: this.monitor_id,