data-manager/blueprints/auth.py
2026-01-08 10:25:45 +08:00

15 lines
397 B
Python

from flask import Blueprint, request
from common.response import success
from services.auth_service import AuthService
auth_bp = Blueprint("auth", __name__, url_prefix="/api/auth")
@auth_bp.post("/login")
def login():
body = request.get_json()
username = body.get("username")
password = body.get("password")
data = AuthService.login(username, password)
return success(data)