From e0d844039ae613381e1a4179e472ea796e48f77e Mon Sep 17 00:00:00 2001 From: emile Date: Mon, 16 Sep 2024 12:10:44 +0300 Subject: [PATCH] new --- osinaweb/osichat/api/views.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/osinaweb/osichat/api/views.py b/osinaweb/osichat/api/views.py index e6babf11..e60c14a8 100644 --- a/osinaweb/osichat/api/views.py +++ b/osinaweb/osichat/api/views.py @@ -60,6 +60,7 @@ def get_visitors(request): @api_view(['GET']) def get_staffs(request): staffs = StaffProfile.objects.filter(user__is_active=True).all().order_by('user__first_name') + staffs_data = [] for staff in staffs: staff_data = { "id": staff.id, @@ -68,8 +69,9 @@ def get_staffs(request): "image": staff.image.url, "last_seen": staff.get_last_seen } + staffs_data.append(staff_data) - return successRes(staff_data) + return successRes(staffs_data)