aboutsummaryrefslogtreecommitdiff
path: root/api
diff options
context:
space:
mode:
Diffstat (limited to 'api')
-rw-r--r--api/api.ts9
-rw-r--r--api/main.py10
-rw-r--r--api/passwords.py2
3 files changed, 15 insertions, 6 deletions
diff --git a/api/api.ts b/api/api.ts
new file mode 100644
index 0000000..e2e3d93
--- /dev/null
+++ b/api/api.ts
@@ -0,0 +1,9 @@
+export interface userInfo {
+ avatar?: string|null,
+ coutry?: string|null,
+ id?: string,
+ registered?: number,
+ type?: string,
+ username?: string,
+};
+
diff --git a/api/main.py b/api/main.py
index f5907cc..0d16cbc 100644
--- a/api/main.py
+++ b/api/main.py
@@ -15,9 +15,9 @@ from auth.signup import signup
from auth.login import login
from auth.login_token import token
-app.register_blueprint(status, url_prefix='/api')
-app.register_blueprint(info, url_prefix='/api/user')
-app.register_blueprint(signup, url_prefix='/api/auth')
-app.register_blueprint(login, url_prefix='/api/auth')
-app.register_blueprint(token, url_prefix='/api/auth')
+app.register_blueprint(status, url_prefix='/')
+app.register_blueprint(info, url_prefix='/user')
+app.register_blueprint(signup, url_prefix='/auth')
+app.register_blueprint(login, url_prefix='/auth')
+app.register_blueprint(token, url_prefix='/auth')
diff --git a/api/passwords.py b/api/passwords.py
index 011400e..e2ae552 100644
--- a/api/passwords.py
+++ b/api/passwords.py
@@ -7,4 +7,4 @@ def check_password(password, password_hash):
return bcrypt.checkpw(enc(password), password_hash)
def password_hash(password):
- return bcrypt.hashpw(enc(password), bcrypt.gensalt());
+ return bcrypt.hashpw(enc(password), bcrypt.gensalt())