Use Env variables for database
This will enable us to use postgres/sqlite without any code changes Signed-off-by: baalajimaestro <me@baalajimaestro.me>
This commit is contained in:
parent
869820bc19
commit
a87f37f689
1 changed files with 2 additions and 1 deletions
|
@ -7,6 +7,7 @@ type
|
|||
ftype*: string
|
||||
fhash*: string
|
||||
fileid*: string
|
||||
time*: float
|
||||
caption*: string
|
||||
|
||||
type
|
||||
|
@ -27,7 +28,7 @@ func NewCensoredData*(ftype = ""; fhash = ""; fileid = ""; caption = ""):
|
|||
func NewBannedUsers*(userid = int64(0), bantime = 0.0, bantype = ""):
|
||||
BannedUsers = BannedUsers(userid: userid, bantime: bantime, bantype: bantype)
|
||||
|
||||
let dbConn* = sqlite.open("censordata.db", "", "", "")
|
||||
let dbConn* = getDb()
|
||||
|
||||
proc ManageRateLimit(): void=
|
||||
for i in RateLimiter.keys().toSeq():
|
||||
|
|
Loading…
Reference in a new issue