Implement login API, closes #1 #2
@@ -1,10 +1,10 @@
|
||||
from flask import Blueprint, request, jsonify
|
||||
from model.user import User
|
||||
|
||||
loginBP = Blueprint("loginapi", __name__)
|
||||
auth = Blueprint("auth", __name__)
|
||||
|
||||
|
||||
@loginBP.route('/api/auth/login', methods = ['POST'])
|
||||
@auth.route('/login', methods = ['POST'])
|
||||
def login():
|
||||
if request.is_json:
|
||||
req = request.json
|
||||
@@ -1,6 +1,6 @@
|
||||
from sys import exit
|
||||
from flask import Flask
|
||||
from api.auth.loginapi import loginBP
|
||||
from api.auth import auth
|
||||
from utils.loadDotEnv import initializeENV
|
||||
from utils.PostgressConnect import PSQLConnect, PSQLCursor
|
||||
|
||||
@@ -12,4 +12,4 @@ if not initializeENV():
|
||||
|
||||
app = Flask(__name__)
|
||||
|
||||
app.register_blueprint(loginBP)
|
||||
app.register_blueprint(auth, url_prefix='/api/auth')
|
||||
|
||||
Reference in New Issue
Block a user