Skip to content

Commit

Permalink
readCustomHasuraConfigs: use hasura.Request
Browse files Browse the repository at this point in the history
  • Loading branch information
852Kerfunkle committed Apr 22, 2022
1 parent a6395ef commit 7192af6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cmd/metadata/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -225,13 +225,13 @@ func createViews(ctx context.Context, database golibConfig.Database) ([]string,
return views, nil
}

func readCustomHasuraConfigs(ctx context.Context, database golibConfig.Database) ([]interface{}, error) {
func readCustomHasuraConfigs(ctx context.Context, database golibConfig.Database) ([]hasura.Request, error) {
files, err := ioutil.ReadDir("custom_hasura_config")
if err != nil {
return nil, err
}

custom_configs := make([]interface{}, 0)
custom_configs := make([]hasura.Request, 0)
for i := range files {
if files[i].IsDir() {
continue
Expand All @@ -243,7 +243,7 @@ func readCustomHasuraConfigs(ctx context.Context, database golibConfig.Database)
return nil, err
}

conf := make(map[string]interface{})
conf := hasura.Request{}

err = json.Unmarshal([]byte(raw), &conf)
if err != nil {
Expand Down

0 comments on commit 7192af6

Please sign in to comment.