Push all previous files to repo (26.01.08-LATEST)
This commit is contained in:
21
utils.py
Normal file
21
utils.py
Normal file
@@ -0,0 +1,21 @@
|
||||
from flask import redirect as fredirect
|
||||
import json
|
||||
|
||||
def redirect(url):
|
||||
return fredirect(url)
|
||||
|
||||
def dbload():
|
||||
with open('db.json', 'r') as f:
|
||||
return json.load(f)
|
||||
|
||||
def dbsave(obj):
|
||||
with open('db.json', 'w') as f:
|
||||
json.dump(obj, f)
|
||||
|
||||
def udbload():
|
||||
with open('users.json', 'r') as f:
|
||||
return json.load(f)
|
||||
|
||||
def udbsave(obj):
|
||||
with open('users.json', 'w') as f:
|
||||
json.dump(obj, f)
|
||||
Reference in New Issue
Block a user