mirror of
https://github.com/sot-tech/mochi.git
synced 2026-05-24 08:44:48 -07:00
Fix approval hook build
This commit is contained in:
committed by
Lawrence, Rendall
parent
04f1a9efb9
commit
e7c5263dd7
@@ -42,15 +42,14 @@ func (d driver) NewHook(optionBytes []byte, storage storage.Storage) (middleware
|
||||
}
|
||||
|
||||
var confBytes []byte
|
||||
if confBytes, err = yaml.Marshal(cfg.Options); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if c, err := container.GetContainer(cfg.Name, confBytes, storage); err == nil {
|
||||
return &hook{c}, nil
|
||||
} else {
|
||||
return nil, err
|
||||
var h *hook
|
||||
if confBytes, err = yaml.Marshal(cfg.Options); err == nil {
|
||||
var c container.Container
|
||||
if c, err = container.GetContainer(cfg.Name, confBytes, storage); err == nil {
|
||||
h = &hook{c}
|
||||
}
|
||||
}
|
||||
return h, err
|
||||
}
|
||||
|
||||
// ErrTorrentUnapproved is the error returned when a torrent hash is invalid.
|
||||
|
||||
Reference in New Issue
Block a user