mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-09-22 05:24:48 -04:00
Added JSDoc for server/
Signed-off-by: Matthew Nickson <mnickson@sidingsmedia.com>
This commit is contained in:
parent
c7eb72e73b
commit
caff9ca736
10 changed files with 104 additions and 4 deletions
|
@ -748,6 +748,13 @@ class Monitor extends BeanModel {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Make a request using axios
|
||||
* @param {Object} options Options for Axios
|
||||
* @param {boolean} finalCall Should this be the final call i.e
|
||||
* don't retry on faliure
|
||||
* @returns {Object} Axios response
|
||||
*/
|
||||
async makeAxiosRequest(options, finalCall = false) {
|
||||
try {
|
||||
let res;
|
||||
|
@ -1229,6 +1236,7 @@ class Monitor extends BeanModel {
|
|||
return maintenance.count !== 0;
|
||||
}
|
||||
|
||||
/** Make sure monitor interval is between bounds */
|
||||
validate() {
|
||||
if (this.interval > MAX_INTERVAL_SECOND) {
|
||||
throw new Error(`Interval cannot be more than ${MAX_INTERVAL_SECOND} seconds`);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue