Deletion of notification services.

This commit is contained in:
Magnus Åhall 2024-06-28 17:18:08 +02:00
parent c7ad2aa1b6
commit a736ae60af
10 changed files with 74 additions and 9 deletions

View file

@ -95,6 +95,8 @@ func (script Script) Send(problemID int, msg []byte) (err error) {
func (script *Script) Update(values url.Values) (err error) {
updated := Script{}
script.updated = &updated
updated.Prio, err = strconv.Atoi(values.Get("prio"))
if err != nil {
return werr.Wrap(err)
@ -105,8 +107,6 @@ func (script *Script) Update(values url.Values) (err error) {
return werr.New("Filename cannot be empty")
}
updated.Filename = strings.TrimSpace(givenFilename)
script.updated = &updated
return
}