diff options
author | Zach Berwaldt <zberwaldt@tutamail.com> | 2024-03-07 23:16:22 -0500 |
---|---|---|
committer | Zach Berwaldt <zberwaldt@tutamail.com> | 2024-03-07 23:16:22 -0500 |
commit | 8fab2d03bce82e4dee798ebffb1e93c557f62a4b (patch) | |
tree | 3d1c769e5f0a1791f45b549b96df30e7f66b7a67 /api/internal/database | |
parent | 831b6f0167b9c1747d128b4a5a648d4de42ff0a9 (diff) |
feat: Update authentication route and add comments to exported members
- The authentication route in the API has been updated to use a new router setup function.
- Comments have been added to all exported members of the `auth.go` module in the internal controllers package.
Diffstat (limited to 'api/internal/database')
-rw-r--r-- | api/internal/database/database.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/api/internal/database/database.go b/api/internal/database/database.go index 19ae818..7af9780 100644 --- a/api/internal/database/database.go +++ b/api/internal/database/database.go | |||
@@ -7,14 +7,14 @@ import ( | |||
7 | ) | 7 | ) |
8 | 8 | ||
9 | func SetupDatabase() { | 9 | func SetupDatabase() { |
10 | _, err := sql.Open("sqlite3", "water.db") | 10 | _, err := sql.Open("sqlite3", "water.sqlite3") |
11 | if err != nil { | 11 | if err != nil { |
12 | log.Fatal(err) | 12 | log.Fatal(err) |
13 | } | 13 | } |
14 | } | 14 | } |
15 | 15 | ||
16 | func EstablishDBConnection() *sql.DB { | 16 | func EstablishDBConnection() *sql.DB { |
17 | db, err := sql.Open("sqlite3", "../../db/water.sqlite3") | 17 | db, err := sql.Open("sqlite3", "../db/water.sqlite3") |
18 | if err != nil { | 18 | if err != nil { |
19 | panic(err) | 19 | panic(err) |
20 | } | 20 | } |