added some little details on the api
This commit is contained in:
parent
0e40040729
commit
d43a2d4cf2
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -9,6 +9,7 @@ from .serializers import BalanceSerializer, ImageSerializer
|
||||
class BalanceView(viewsets.ModelViewSet):
|
||||
permission_classes = [permissions.IsAuthenticated]
|
||||
serializer_class = BalanceSerializer
|
||||
http_method_names = ['get']
|
||||
|
||||
def get_queryset(self):
|
||||
return Balance.objects.filter(user=self.request.user)
|
||||
@ -17,6 +18,7 @@ class BalanceView(viewsets.ModelViewSet):
|
||||
class ImageView(viewsets.ModelViewSet):
|
||||
permission_classes = [permissions.IsAuthenticated]
|
||||
serializer_class = ImageSerializer
|
||||
http_method_names = ['get','post']
|
||||
|
||||
def get_queryset(self):
|
||||
return Media.objects.filter(user=self.request.user)
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
reValuate/media/1/0RhOu.png
Normal file
BIN
reValuate/media/1/0RhOu.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 29 KiB |
BIN
reValuate/media/1/pexels-mali-maeder-802221_BrOpcta.jpg
Normal file
BIN
reValuate/media/1/pexels-mali-maeder-802221_BrOpcta.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 747 KiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -27,8 +27,8 @@ from users.views import getBalance, addToBalance, adminView, removeBalance
|
||||
|
||||
|
||||
router = routers.DefaultRouter()
|
||||
router.register("balance", BalanceView)
|
||||
router.register("images", ImageView)
|
||||
router.register("balance", BalanceView, basename="balance")
|
||||
router.register("images", ImageView, basename="image")
|
||||
|
||||
urlpatterns = [
|
||||
|
||||
|
Reference in New Issue
Block a user