Add NextSnap PWA with photo gallery viewer and continuous capture
Offline-first photo capture app for Nextcloud with: - Camera capture with continuous mode (auto-reopens after each photo) - File browser with fullscreen image gallery, swipe navigation, and rename - Upload queue with background sync engine - Admin panel for Nextcloud user management - Service worker for offline-first caching (v13) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
35
app/routes/health.py
Normal file
35
app/routes/health.py
Normal file
@@ -0,0 +1,35 @@
|
||||
from flask import Blueprint, jsonify
|
||||
import requests
|
||||
from config import Config
|
||||
|
||||
bp = Blueprint('health', __name__, url_prefix='/api')
|
||||
|
||||
@bp.route('/health', methods=['GET'])
|
||||
def health_check():
|
||||
"""Health check endpoint for monitoring."""
|
||||
return jsonify({
|
||||
'status': 'healthy',
|
||||
'service': 'nextsnap',
|
||||
'version': '1.0.0'
|
||||
}), 200
|
||||
|
||||
@bp.route('/health/nextcloud', methods=['GET'])
|
||||
def nextcloud_health():
|
||||
"""Check connectivity to Nextcloud instance."""
|
||||
try:
|
||||
nc_url = Config.NEXTCLOUD_URL
|
||||
response = requests.get(f"{nc_url}/status.php", timeout=5)
|
||||
response.raise_for_status()
|
||||
|
||||
return jsonify({
|
||||
'status': 'healthy',
|
||||
'nextcloud_url': nc_url,
|
||||
'nextcloud_reachable': True
|
||||
}), 200
|
||||
except Exception as e:
|
||||
return jsonify({
|
||||
'status': 'degraded',
|
||||
'nextcloud_url': Config.NEXTCLOUD_URL,
|
||||
'nextcloud_reachable': False,
|
||||
'error': str(e)
|
||||
}), 503
|
||||
Reference in New Issue
Block a user