Internal
Public Access
Created /api/ endpoint that returns JSON with: - API status - Available endpoints - Version information This fixes the "Not Found" error when accessing /api/ and provides a useful API discovery endpoint for clients. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
24 lines
525 B
Python
24 lines
525 B
Python
"""
|
|
API root views for KeepItGoing.
|
|
"""
|
|
|
|
from django.http import JsonResponse
|
|
|
|
|
|
def api_root(request):
|
|
"""
|
|
API root endpoint - returns available API endpoints.
|
|
"""
|
|
return JsonResponse({
|
|
'message': 'KeepItGoing API',
|
|
'version': '1.0',
|
|
'endpoints': {
|
|
'users': '/api/users/',
|
|
'tasks': '/api/tasks/',
|
|
'sync': '/api/sync/',
|
|
'notifications': '/api/notifications/',
|
|
'admin': '/admin/',
|
|
},
|
|
'status': 'running'
|
|
})
|