mirror of
https://github.com/eitchtee/WYGIWYH.git
synced 2026-04-25 10:08:36 +02:00
feat: add api
This commit is contained in:
16
app/apps/api/views/currencies.py
Normal file
16
app/apps/api/views/currencies.py
Normal file
@@ -0,0 +1,16 @@
|
||||
from rest_framework import viewsets
|
||||
|
||||
from apps.api.serializers import ExchangeRateSerializer
|
||||
from apps.api.serializers import CurrencySerializer
|
||||
from apps.currencies.models import Currency
|
||||
from apps.currencies.models import ExchangeRate
|
||||
|
||||
|
||||
class CurrencyViewSet(viewsets.ModelViewSet):
|
||||
queryset = Currency.objects.all()
|
||||
serializer_class = CurrencySerializer
|
||||
|
||||
|
||||
class ExchangeRateViewSet(viewsets.ModelViewSet):
|
||||
queryset = ExchangeRate.objects.all()
|
||||
serializer_class = ExchangeRateSerializer
|
||||
Reference in New Issue
Block a user