fnp
/
wolnelektury.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
8799674
)
std response format for sync data
author
Radek Czajka
<rczajka@rczajka.pl>
Wed, 12 Nov 2025 14:25:17 +0000
(15:25 +0100)
committer
Radek Czajka
<rczajka@rczajka.pl>
Wed, 12 Nov 2025 14:25:17 +0000
(15:25 +0100)
src/catalogue/api/views.py
patch
|
blob
|
history
diff --git
a/src/catalogue/api/views.py
b/src/catalogue/api/views.py
index
941b122
..
7457b6f
100644
(file)
--- a/
src/catalogue/api/views.py
+++ b/
src/catalogue/api/views.py
@@
-257,7
+257,10
@@
class BookSyncView(RetrieveAPIView):
def retrieve(self, request, *args, **kwargs):
instance = self.get_object()
def retrieve(self, request, *args, **kwargs):
instance = self.get_object()
- return Response(json.loads(instance.get_sync()))
+ return Response([
+ {"id": i, "timestamp": ts}
+ for (i, ts) in json.loads(instance.get_sync())
+ ])
@vary_on_auth # Because of embargo links.
@vary_on_auth # Because of embargo links.