mirror of
https://gitlab.com/ric_harvey/MailHog.git
synced 2024-11-27 16:24:04 +00:00
Use single API constructor
Individual constructors for each API version were removed in GREsau/MailHog-Server@e7f979c845
This commit is contained in:
parent
9976d0251c
commit
8dfadf408a
1 changed files with 2 additions and 4 deletions
6
main.go
6
main.go
|
@ -76,14 +76,12 @@ func main() {
|
|||
if uiconf.UIBindAddr == apiconf.APIBindAddr {
|
||||
cb := func(r gohttp.Handler) {
|
||||
web.CreateWeb(uiconf, r.(*pat.Router), assets.Asset)
|
||||
api.CreateAPIv1(apiconf, r.(*pat.Router))
|
||||
api.CreateAPIv2(apiconf, r.(*pat.Router))
|
||||
api.CreateAPI(apiconf, r.(*pat.Router))
|
||||
}
|
||||
go http.Listen(uiconf.UIBindAddr, assets.Asset, exitCh, cb)
|
||||
} else {
|
||||
cb1 := func(r gohttp.Handler) {
|
||||
api.CreateAPIv1(apiconf, r.(*pat.Router))
|
||||
api.CreateAPIv2(apiconf, r.(*pat.Router))
|
||||
api.CreateAPI(apiconf, r.(*pat.Router))
|
||||
}
|
||||
cb2 := func(r gohttp.Handler) {
|
||||
web.CreateWeb(uiconf, r.(*pat.Router), assets.Asset)
|
||||
|
|
Loading…
Reference in a new issue