mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-08-03 12:06:04 -04:00
Add JSDoc to server/model/*
Signed-off-by: Matthew Nickson <mnickson@sidingsmedia.com>
This commit is contained in:
parent
5a209c74e1
commit
45f44b183d
5 changed files with 96 additions and 6 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue