mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-07-21 06:02:04 -04:00
Add JSDoc to server/socket-handlers/*
Signed-off-by: Matthew Nickson <mnickson@sidingsmedia.com>
This commit is contained in:
parent
3d04befc1f
commit
068b920553
4 changed files with 31 additions and 0 deletions
|
@ -8,6 +8,10 @@ const apicache = require("../modules/apicache");
|
|||
const StatusPage = require("../model/status_page");
|
||||
const { UptimeKumaServer } = require("../uptime-kuma-server");
|
||||
|
||||
/**
|
||||
* Socket handlers for status page
|
||||
* @param {Socket} socket Socket.io instance to add listeners on
|
||||
*/
|
||||
module.exports.statusPageSocketHandler = (socket) => {
|
||||
|
||||
// Post or edit incident
|
||||
|
@ -338,6 +342,7 @@ module.exports.statusPageSocketHandler = (socket) => {
|
|||
/**
|
||||
* Check slug a-z, 0-9, - only
|
||||
* Regex from: https://stackoverflow.com/questions/22454258/js-regex-string-validation-for-slug
|
||||
* @param {string} slug Slug to test
|
||||
*/
|
||||
function checkSlug(slug) {
|
||||
if (typeof slug !== "string") {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue