MetaPhase-Consulting/State-TalentMAP-API

View on GitHub
talentmap_api/fsbid/views/manage_bid_seasons.py

Summary

Maintainability
A
0 mins
Test Coverage
F
57%
import logging

from talentmap_api.fsbid.views.base import BaseView
from rest_framework.response import Response
import talentmap_api.fsbid.services.manage_bid_seasons as services

logger = logging.getLogger(__name__)

class FSBidManageBidSeasonsView(BaseView):
    '''
    Gets the Data for the Manage Bid Seasons Page
    '''
    def get(self, request):
        jwt = request.META['HTTP_JWT']
        result = services.get_bid_seasons_data(jwt, request.query_params)
        return Response(result)
    '''
    Create/Edit an existing Bid Season
    '''
    def post(self, request):
        jwt = request.META['HTTP_JWT']
        result = services.update_bid_seasons_data(jwt, request.data)
        return result