Fix tests for log levels and work on adding title
This commit is contained in:
@@ -14,6 +14,7 @@ import (
|
||||
)
|
||||
|
||||
type upsertRequest struct {
|
||||
Title string `json:"title"`
|
||||
ID string `json:"id"`
|
||||
Language string `json:"language"`
|
||||
Cron string `json:"cron"`
|
||||
@@ -35,6 +36,9 @@ func (u *upsertRequest) validate() error {
|
||||
} else if _, err := config.Store.Get(u.ID, ns.Jobs...); err != nil {
|
||||
return fmt.Errorf("ID provided but not accessible: %v", err)
|
||||
}
|
||||
if u.Title == "" {
|
||||
u.Title = u.ID
|
||||
}
|
||||
if u.Language == "" {
|
||||
return errors.New("language required")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user