Skip to content

Commit

Permalink
Simplified project structure (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
AmineAfia authored Sep 17, 2024
1 parent e4635b2 commit 795655c
Show file tree
Hide file tree
Showing 10 changed files with 4 additions and 2 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func GetBlocks(w http.ResponseWriter, r *http.Request) {
api.InternalErrorHandler(w)
return
}
defer conn.Close()
// defer conn.Close()

row := conn.QueryRow(context.Background(), "SELECT block_hash FROM chainsaw.blocks LIMIT 1")
var blockHash string
Expand All @@ -55,4 +55,6 @@ func GetBlocks(w http.ResponseWriter, r *http.Request) {
api.InternalErrorHandler(w)
return
}

defer conn.Close()
}
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
)

func ConnectDB() (clickhouse.Conn, error) {
// Load .env file
// TODO load .env in the mapi main file
err := godotenv.Load()
if err != nil {
return nil, fmt.Errorf("error loading .env file: %w", err)
Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit 795655c

Please sign in to comment.