def put(self, request, user_id): response = ResponseService() request = RequestService(request.data, GeneralInformationSerializer) controller = GeneralInformationUpdaterController( request=request, response=response, ) response = controller(user_id=user_id) return response
def post(self, request): request_service = RequestService(request.data, LoginCreatorSerializer) response = ResponseService() serializer = GetterSerializerService(LoginGetterSerializer, context={"request": request}) login_controller = LoginController( request=request_service, serializer=serializer, response=response ) response = login_controller() return response
def post(self, request, student_id, type): repository = AddressRepository() response = ResponseService() request = RequestService(request.data, AddressSerializer) controller = ParentAddressCreatorController( repository=repository, request=request, response=response, ) response = controller(student_id=student_id, type=type) return response
def put(self, request, student_id, type): repository = ParentRepository() response = ResponseService() request = RequestService(request.data, ParentSerializer) controller = ParentUpdaterController( repository=repository, request=request, response=response, ) response = controller(student_id=student_id, type=type) return response
def put(self, request, student_id): repository = StudentRepository() response = ResponseService() request = RequestService(request.data, ProfileSerializer) controller = ProfileSetterController( request=request, repository=repository, response=response, ) response = controller(id=student_id) return response
def put(self, request, student_id): repository = AddressRepository() response = ResponseService() request = RequestService(request.data, AddressSerializer) updater_controller = AddressUpdaterController( request=request, repository=repository, response=response, ) response = updater_controller(student_id=student_id) return response
def put(self, request, user_id): repository = UserRepository() response = ResponseService() request = RequestService(request.data, UserSerializer) controller = UserSetterController( request=request, repository=repository, response=response, ) response = controller(user_id=user_id) return response
def post(self, request): user = request.user repository = StudentInstituteRepository() response = ResponseService() request = RequestService(request.data, InstituteSerializer) creator_controller = InstituteCreatorController( request=request, repository=repository, response=response, ) response = creator_controller(student_id=user.student.id) return response
def put(self, request, student_id, medical_information_id): repository = MedicalInformationRepository() response = ResponseService() request = RequestService(request.data, MedicalInformationSerializer) controller = MedicalInformationUpdaterController( repository=repository, request=request, response=response, ) response = controller(student_id=student_id, medical_information_id=medical_information_id) return response
def put(self, request, institute_id): user = request.user repository = StudentInstituteRepository() response = ResponseService() request = RequestService(request.data, InstituteSerializer) updater_controller = InstituteUpdaterController( request=request, repository=repository, response=response, ) response = updater_controller(student_id=user.student.id, institute_id=institute_id) return response