From b5dd4fbea5888861a41a0dab5605cebbc817d08b Mon Sep 17 00:00:00 2001 From: Reckless_Satoshi Date: Fri, 1 Jul 2022 04:22:26 -0700 Subject: [PATCH] Improve clarity on order not available message --- api/views.py | 6 +++--- frontend/src/locales/en.json | 2 +- frontend/src/locales/es.json | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/api/views.py b/api/views.py index f161bbb3..2d2cc59f 100644 --- a/api/views.py +++ b/api/views.py @@ -220,7 +220,7 @@ class OrderView(viewsets.ViewSet): # 3.a) If not a participant and order is not public, forbid. if not data["is_participant"] and order.status != Order.Status.PUB: return Response( - {"bad_request": "You are not allowed to see this order"}, + {"bad_request": "This order is not available"}, status.HTTP_403_FORBIDDEN, ) @@ -951,7 +951,7 @@ class RewardView(CreateAPIView): return Response({"successful_withdrawal": True}, status.HTTP_200_OK) -class PriceView(CreateAPIView): +class PriceView(ListAPIView): serializer_class = PriceSerializer @@ -975,7 +975,7 @@ class PriceView(CreateAPIView): return Response(payload, status.HTTP_200_OK) -class TickView(CreateAPIView): +class TickView(ListAPIView): queryset = MarketTick.objects.all() serializer_class = TickSerializer diff --git a/frontend/src/locales/en.json b/frontend/src/locales/en.json index b4d04dbe..26255bfd 100644 --- a/frontend/src/locales/en.json +++ b/frontend/src/locales/en.json @@ -251,7 +251,7 @@ "Invalid Order Id":"Invalid Order Id", "You must have a robot avatar to see the order details":"You must have a robot avatar to see the order details", "This order has been cancelled collaborativelly":"This order has been cancelled collaboratively", - "You are not allowed to see this order":"You are not allowed to see this order", + "This order is not available":"This order is not available", "The Robotic Satoshis working in the warehouse did not understand you. Please, fill a Bug Issue in Github https://github.com/reckless-satoshi/robosats/issues":"The Robotic Satoshis working in the warehouse did not understand you. Please, fill a Bug Issue in Github https://github.com/reckless-satoshi/robosats/issues", "CHAT BOX - Chat.js":"Chat Box", diff --git a/frontend/src/locales/es.json b/frontend/src/locales/es.json index 9cf99a79..9aefa9c6 100644 --- a/frontend/src/locales/es.json +++ b/frontend/src/locales/es.json @@ -252,7 +252,7 @@ "Invalid Order Id": "ID de orden no válida", "You must have a robot avatar to see the order details": "Debes tener un Robot para ver los detalles de la orden", "This order has been cancelled collaborativelly":"Esta orden se ha cancelado colaborativamente", - "You are not allowed to see this order": "No tienes permiso para ver esta orden", + "This order is not available": "Esta orden no está disponible", "The Robotic Satoshis working in the warehouse did not understand you. Please, fill a Bug Issue in Github https://github.com/reckless-satoshi/robosats/issues": "Los Satoshis Robóticos del almacén no te entendieron. Por favor rellena un Bug Issue en Github https://github.com/reckless-satoshi/robosats/issues",