-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bad8eb6
commit c143d49
Showing
66 changed files
with
916 additions
and
546 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import os | ||
|
||
from dotenv import load_dotenv | ||
|
||
load_dotenv() | ||
DATABASE_URL = os.getenv("DATABASE_URL") | ||
|
||
# Private key used to generate the JWT tokens for secure authentication | ||
SECRET_KEY = os.getenv("SECRET_KEY", "default_unsecure_key") | ||
|
||
# Algorithm used to generate JWT tokens | ||
ALGORITHM = os.getenv("ALGORITHM", "HS256") | ||
|
||
# If the API runs in admin mode, it will allow the creation of new users | ||
ADMIN_MODE = bool(int(os.getenv("ADMIN_MODE", False))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
-- Dialect MUST be sqlite, even if the database you use is different. | ||
-- It is transpiled to the right dialect when executed. | ||
|
||
CREATE TABLE IF NOT EXISTS "users" ( | ||
"email" VARCHAR(255) PRIMARY KEY, | ||
"password" TEXT | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
-- Dialect MUST be sqlite, even if the database you use is different. | ||
-- It is transpiled to the right dialect when executed. | ||
|
||
CREATE TABLE IF NOT EXISTS "users" ( | ||
"email" VARCHAR(255) PRIMARY KEY, | ||
"password" TEXT | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
-- Dialect MUST be sqlite, even if the database you use is different. | ||
-- It is transpiled to the right dialect when executed. | ||
|
||
CREATE TABLE IF NOT EXISTS "session" ( | ||
"id" VARCHAR(255) PRIMARY KEY, | ||
"timestamp" DATETIME, | ||
"user_id" VARCHAR(255), | ||
FOREIGN KEY ("user_id") REFERENCES "users" ("email") | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.