Compare commits
No commits in common. "8cf8c7871b4753cba07bc1074393005262e0ce0b" and "e7c7a6bf3025a88b89ac8786a2504147d668818b" have entirely different histories.
8cf8c7871b
...
e7c7a6bf30
4 changed files with 2 additions and 18 deletions
|
@ -17,7 +17,7 @@ steps:
|
|||
- APP_NAME=mailcow-admin-aliases
|
||||
- FORGE=https://code.lila.network
|
||||
commands:
|
||||
- apk add --update --no-cache xz curl jq make git
|
||||
- apk add --update --no-cache xz curl jq make
|
||||
- go mod download
|
||||
- make build
|
||||
- cd bin
|
||||
|
|
|
@ -7,13 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
|
||||
|
||||
## [Unreleased]
|
||||
## [1.0.1] - 2024-07-26
|
||||
### Fixed
|
||||
- better error handling when API responds with an error
|
||||
|
||||
## [1.0.0] - 2024-07-26
|
||||
First release of `mailcow-admin-aliases`
|
||||
|
||||
[unreleased]: https://code.lila.network/adoralaura/mailcow-admin-aliases/compare/1.0.1...HEAD
|
||||
[1.0.1]: https://code.lila.network/adoralaura/mailcow-admin-aliases/compare/1.0.0...1.0.1
|
||||
[unreleased]: https://code.lila.network/adoralaura/mailcow-admin-aliases/compare/1.0.0...HEAD
|
||||
[1.0.0]: https://code.lila.network/adoralaura/mailcow-admin-aliases/releases/tag/1.0.0
|
||||
|
|
|
@ -7,7 +7,6 @@ import (
|
|||
"io"
|
||||
"log/slog"
|
||||
"net/http"
|
||||
"os"
|
||||
"time"
|
||||
|
||||
"code.lila.network/adoralaura/mailcow-admin-aliases/internal/configuration"
|
||||
|
@ -65,11 +64,6 @@ func LoadAliases(cfg configuration.Config) ([]MailcowAlias, []string, error) {
|
|||
|
||||
slog.Debug("alias response received", "status", res.Status, "status-code", res.StatusCode)
|
||||
|
||||
if res.StatusCode != 200 {
|
||||
slog.Error("API request unsuccessful", "status", res.Status, "status-code", res.StatusCode)
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
body, err := io.ReadAll(res.Body)
|
||||
if err != nil {
|
||||
return []MailcowAlias{}, []string{}, fmt.Errorf("failed to read alias request body: %w", err)
|
||||
|
|
|
@ -6,7 +6,6 @@ import (
|
|||
"io"
|
||||
"log/slog"
|
||||
"net/http"
|
||||
"os"
|
||||
"time"
|
||||
|
||||
"code.lila.network/adoralaura/mailcow-admin-aliases/internal/configuration"
|
||||
|
@ -38,11 +37,6 @@ func LoadDomains(cfg configuration.Config) ([]MailcowDomain, error) {
|
|||
}
|
||||
defer res.Body.Close()
|
||||
|
||||
if res.StatusCode != 200 {
|
||||
slog.Error("API request unsuccessful", "status", res.Status, "status-code", res.StatusCode)
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
slog.Debug("domain response received", "status", res.Status, "status-code", res.StatusCode)
|
||||
|
||||
body, err := io.ReadAll(res.Body)
|
||||
|
|
Loading…
Reference in a new issue