mirror of
https://github.com/sotam0316/brain_dogfood.git
synced 2026-04-25 03:48:38 +09:00
13 lines
406 B
Python
13 lines
406 B
Python
from flask import Blueprint, request, jsonify # type: ignore
|
|
from ..auth import login_required
|
|
from ..services.memo_service import MemoService
|
|
|
|
stats_bp = Blueprint('stats', __name__)
|
|
|
|
@stats_bp.route('/api/stats/heatmap', methods=['GET'])
|
|
@login_required
|
|
def get_heatmap_stats():
|
|
days = request.args.get('days', 365, type=int)
|
|
stats = MemoService.get_heatmap_stats(days)
|
|
return jsonify(stats)
|