mirror of
https://github.com/chibicitiberiu/ytsm.git
synced 2024-02-24 05:43:31 +00:00
13 lines
434 B
Python
13 lines
434 B
Python
from django.contrib.auth.decorators import login_required
|
|
from django.http import HttpRequest, JsonResponse
|
|
|
|
from YtManagerApp.management.notification_manager import get_notifications
|
|
|
|
|
|
@login_required
|
|
def ajax_get_notifications(request: HttpRequest, last_id: int):
|
|
user = request.user
|
|
notifications = get_notifications(user, last_id)
|
|
notifications = list(notifications)
|
|
return JsonResponse(notifications, safe=False)
|