Download OneApi/api/project_info.py from dragxd/oneapi: direct link, hf CLI and curl.
- Browser
- Download file 636 Bytes
-
https://huggingface.co/spaces/dragxd/oneapi/resolve/main/OneApi/api/project_info.py
- Command line
-
hf download hf://spaces/dragxd/oneapi/OneApi/api/project_info.py
-
curl -L -o project_info.py https://huggingface.co/spaces/dragxd/oneapi/resolve/main/OneApi/api/project_info.py
636 Bytes
| from ..database import * | |
| from quart import * | |
| from .. import * | |
| user = user() | |
| project_info_bp = Blueprint('project_info', __name__) | |
| async def project_info(): | |
| data = await request.get_json() | |
| if not data or not 'user_id' in data and not 'project_id' in data: return jsonify({'error': 'missing user_id or project_id'}), 400 | |
| user_id = int(data.get('user_id')) | |
| project_id = int(data.get('project_id')) | |
| mano = await user.find(f'p{user_id}{project_id}', project=True) | |
| if mano: | |
| return jsonify({'message': mano}), 200 | |
| return jsonify({'message': 'Cannot find the project!'}), 400 | |