mirror of
https://github.com/hay-kot/homebox.git
synced 2024-11-25 01:55:43 +00:00
feat : Validate bark, ntfy, generic+ shortcut (#591)
This commit is contained in:
parent
51ba15f84c
commit
da22074ed3
1 changed files with 3 additions and 0 deletions
|
@ -13,6 +13,7 @@ func init() {
|
||||||
|
|
||||||
err := validate.RegisterValidation("shoutrrr", func(fl validator.FieldLevel) bool {
|
err := validate.RegisterValidation("shoutrrr", func(fl validator.FieldLevel) bool {
|
||||||
prefixes := [...]string{
|
prefixes := [...]string{
|
||||||
|
"bark://",
|
||||||
"discord://",
|
"discord://",
|
||||||
"smtp://",
|
"smtp://",
|
||||||
"gotify://",
|
"gotify://",
|
||||||
|
@ -21,6 +22,7 @@ func init() {
|
||||||
"join://",
|
"join://",
|
||||||
"mattermost://",
|
"mattermost://",
|
||||||
"matrix://",
|
"matrix://",
|
||||||
|
"ntfy://",
|
||||||
"opsgenie://",
|
"opsgenie://",
|
||||||
"pushbullet://",
|
"pushbullet://",
|
||||||
"pushover://",
|
"pushover://",
|
||||||
|
@ -30,6 +32,7 @@ func init() {
|
||||||
"telegram://",
|
"telegram://",
|
||||||
"zulip://",
|
"zulip://",
|
||||||
"generic://",
|
"generic://",
|
||||||
|
"generic+",
|
||||||
}
|
}
|
||||||
|
|
||||||
str := fl.Field().String()
|
str := fl.Field().String()
|
||||||
|
|
Loading…
Reference in a new issue