mirror of
https://github.com/sysadminsmedia/homebox.git
synced 2025-12-24 06:28:34 +01:00
feat : Validate bark, ntfy, generic+ shortcut (#591)
Former-commit-id: da22074ed3
This commit is contained in:
@@ -13,6 +13,7 @@ func init() {
|
||||
|
||||
err := validate.RegisterValidation("shoutrrr", func(fl validator.FieldLevel) bool {
|
||||
prefixes := [...]string{
|
||||
"bark://",
|
||||
"discord://",
|
||||
"smtp://",
|
||||
"gotify://",
|
||||
@@ -21,6 +22,7 @@ func init() {
|
||||
"join://",
|
||||
"mattermost://",
|
||||
"matrix://",
|
||||
"ntfy://",
|
||||
"opsgenie://",
|
||||
"pushbullet://",
|
||||
"pushover://",
|
||||
@@ -30,6 +32,7 @@ func init() {
|
||||
"telegram://",
|
||||
"zulip://",
|
||||
"generic://",
|
||||
"generic+",
|
||||
}
|
||||
|
||||
str := fl.Field().String()
|
||||
|
||||
Reference in New Issue
Block a user