Spaces:
Runtime error
Runtime error
Download auth.py from Mr-profik/Meta-Video: direct link, hf CLI and curl.
- Browser
- Download file 361 Bytes
-
https://huggingface.co/spaces/Mr-profik/Meta-Video/resolve/main/auth.py
- Command line
-
hf download hf://spaces/Mr-profik/Meta-Video/auth.py
-
curl -L -o auth.py https://huggingface.co/spaces/Mr-profik/Meta-Video/resolve/main/auth.py
361 Bytes
| from flask import Blueprint, request, jsonify | |
| from models import User | |
| from database import db | |
| auth_bp = Blueprint("auth", __name__) | |
| def register(): | |
| data = request.json | |
| user = User(username=data["username"]) | |
| db.session.add(user) | |
| db.session.commit() | |
| return jsonify({"message": "user created"}) |