Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions pkg/httpassert/request.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ func (s *starter) Getf(format string, a ...interface{}) Request {
func (s *starter) Options(path string) Request {
return s.newRequest(http.MethodOptions, path)
}

func (s *starter) Optionsf(format string, a ...interface{}) Request {
return s.newRequest(http.MethodOptions, fmt.Sprintf(format, a...))
}
Expand Down
8 changes: 8 additions & 0 deletions pkg/notifications/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,16 @@ const (
LevelInfo Level = "info"
LevelWarning Level = "warning"
LevelError Level = "error"
LevelUrgent Level = "urgent"
)

var AllowedLevels = []Level{
LevelInfo,
LevelWarning,
LevelError,
LevelUrgent,
}

// toNotificationModel converts a Notification to the rest model for the notification service.
// It also adds the current time as timestamp if it is not set.
func toNotificationModel(n Notification) notificationModel {
Expand Down
Loading