Skip to content

Commit

Permalink
Set role to Editor
Browse files Browse the repository at this point in the history
  • Loading branch information
Whyeasy committed Jun 24, 2020
1 parent 4d94324 commit 13ced97
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
build:
runs-on: ubuntu-latest
name: build
needs: linting
steps:
- name: Set up Go 1.14
uses: actions/setup-go@v1
Expand Down
4 changes: 2 additions & 2 deletions internal/apiKey.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func GetAPIKey(c Config) (string, error) {

reqBody, err := json.Marshal(apiRequest{
Name: "snapshot",
Role: "Admin",
Role: "Editor",
})
if err != nil {
return "", err
Expand Down Expand Up @@ -82,7 +82,7 @@ func GetAPIKey(c Config) (string, error) {
return response.Key, nil
}

return "", errors.New("API Key ID already exists")
return "", errors.New("Snapshot ID already exists, please remove snapshot ID from Grafana")
}

func retry(attempts int, sleep time.Duration, f func() error) error {
Expand Down

0 comments on commit 13ced97

Please sign in to comment.