Fakultas Ilmu Komputer UI

Commit 7c32c7a9 authored by Ichlasul Affan's avatar Ichlasul Affan
Browse files

Merge branch '1606895606-83-2' into 'master'

Eliminate Code Smells and Duplications on Backend Codes - 2nd Iteration (1606895606 - #83)

Closes #83

See merge request !153
parents 0e8f280d 1799ceac
Pipeline #25109 passed with stages
in 13 minutes and 49 seconds
...@@ -111,7 +111,7 @@ class CreateAndUpdateVacancyTest(APITestCase): ...@@ -111,7 +111,7 @@ class CreateAndUpdateVacancyTest(APITestCase):
url = '/api/vacancies/' url = '/api/vacancies/'
response = self.client.post(url, {'company': new_company.pk, 'open_time': self.today, response = self.client.post(url, {'company': new_company.pk, 'open_time': self.today,
'close_time': self.tomorrow, 'name': 'new_vacancy', 'close_time': self.tomorrow, 'name': 'new vacancy',
'description': 'new_vacancy ', 'amount': 'sepuluh', 'salary': 'dua juta', 'description': 'new_vacancy ', 'amount': 'sepuluh', 'salary': 'dua juta',
'requirements': 'new_vacancy', 'requirements': 'new_vacancy',
'max_accepted_applicants': 3, 'working_period': '3 Bulan'}, format='json') 'max_accepted_applicants': 3, 'working_period': '3 Bulan'}, format='json')
...@@ -128,7 +128,7 @@ class CreateAndUpdateVacancyTest(APITestCase): ...@@ -128,7 +128,7 @@ class CreateAndUpdateVacancyTest(APITestCase):
url = '/api/vacancies/' url = '/api/vacancies/'
response = self.client.post(url, {'company': new_company.pk, 'open_time': self.today, response = self.client.post(url, {'company': new_company.pk, 'open_time': self.today,
'close_time': self.tomorrow, 'name': 'new_vacancy', 'close_time': self.tomorrow, 'name': 'new vacancy',
'description': 'new_vacancy ', 'amount': 'sepuluh', 'description': 'new_vacancy ', 'amount': 'sepuluh',
'benefits': 'new_vacancy', 'benefits': 'new_vacancy',
'max_accepted_applicants': 3, 'working_period': '3 Bulan'}, format='json') 'max_accepted_applicants': 3, 'working_period': '3 Bulan'}, format='json')
...@@ -149,7 +149,7 @@ class CreateAndUpdateVacancyTest(APITestCase): ...@@ -149,7 +149,7 @@ class CreateAndUpdateVacancyTest(APITestCase):
url = '/api/vacancies/' + str(new_vacancy.pk) + '/' url = '/api/vacancies/' + str(new_vacancy.pk) + '/'
response = self.client.patch(url, {'open_time': self.today, 'close_time': self.tomorrow, response = self.client.patch(url, {'open_time': self.today, 'close_time': self.tomorrow,
'name': 'new_vacancy2', 'description': 'new_vacancy2', 'name': 'new vacancy', 'description': 'new_vacancy2',
'responsibilities': 'new_vacancy2', 'requirements': 'new_vacancy2', 'responsibilities': 'new_vacancy2', 'requirements': 'new_vacancy2',
'max_accepted_applicants': 3, 'working_period': '3 Bulan'}, format='json') 'max_accepted_applicants': 3, 'working_period': '3 Bulan'}, format='json')
self.assertEqual(response.status_code, status.HTTP_200_OK) self.assertEqual(response.status_code, status.HTTP_200_OK)
...@@ -166,7 +166,7 @@ class CreateAndUpdateVacancyTest(APITestCase): ...@@ -166,7 +166,7 @@ class CreateAndUpdateVacancyTest(APITestCase):
url = '/api/vacancies/' + str(new_vacancy.pk) + '/' url = '/api/vacancies/' + str(new_vacancy.pk) + '/'
response = self.client.patch(url, {'open_time': self.today, 'close_time': self.tomorrow, response = self.client.patch(url, {'open_time': self.today, 'close_time': self.tomorrow,
'name': 'new_vacancy2', 'description': 'new_vacancy2', 'amount': 10, 'name': 'new vacancy', 'description': 'new_vacancy2', 'amount': 10,
'salary': 2, 'responsibilities': 'new_vacancy2', 'salary': 2, 'responsibilities': 'new_vacancy2',
'requirements': 'new_vacancy2', 'requirements': 'new_vacancy2',
'max_accepted_applicants': 3, 'working_period': '3 Bulan'}, format='json') 'max_accepted_applicants': 3, 'working_period': '3 Bulan'}, format='json')
...@@ -186,7 +186,7 @@ class CreateAndUpdateVacancyTest(APITestCase): ...@@ -186,7 +186,7 @@ class CreateAndUpdateVacancyTest(APITestCase):
max_accepted_applicants=3) max_accepted_applicants=3)
url = '/api/vacancies/' + str(new_vacancy.pk) + '/' url = '/api/vacancies/' + str(new_vacancy.pk) + '/'
response = self.client.patch(url, {'open_time': self.today, 'close_time': self.tomorrow, 'name': 'new_vacancy2', response = self.client.patch(url, {'open_time': self.today, 'close_time': self.tomorrow, 'name': 'new vacancy',
'description': 'new_vacancy2', 'amount': 10, 'benefits': 'new_vacancy2', 'description': 'new_vacancy2', 'amount': 10, 'benefits': 'new_vacancy2',
'responsibilities': 'new_vacancy2', 'requirements': 'new_vacancy', 'responsibilities': 'new_vacancy2', 'requirements': 'new_vacancy',
'working_period': '3 Bulan', 'max_accepted_applicants': 3}, format='json') 'working_period': '3 Bulan', 'max_accepted_applicants': 3}, format='json')
...@@ -207,7 +207,7 @@ class CreateAndUpdateVacancyTest(APITestCase): ...@@ -207,7 +207,7 @@ class CreateAndUpdateVacancyTest(APITestCase):
url = '/api/vacancies/' + str(new_vacancy.pk) + '/' url = '/api/vacancies/' + str(new_vacancy.pk) + '/'
response = self.client.patch(url, {'open_time': self.today, 'close_time': self.tomorrow, response = self.client.patch(url, {'open_time': self.today, 'close_time': self.tomorrow,
'name': 'new_vacancy2', 'description': 'new_vacancy2', 'amount': 10, 'name': 'new vacancy', 'description': 'new_vacancy2', 'amount': 10,
'responsibilities': 'new_vacancy2', 'requirements': 'new_vacancy2', 'responsibilities': 'new_vacancy2', 'requirements': 'new_vacancy2',
'max_accepted_applicants': 3, 'working_period': '3 Bulan'}, format='json') 'max_accepted_applicants': 3, 'working_period': '3 Bulan'}, format='json')
self.assertEqual(response.status_code, status.HTTP_200_OK) self.assertEqual(response.status_code, status.HTTP_200_OK)
...@@ -246,7 +246,7 @@ class CreateAndUpdateVacancyTest(APITestCase): ...@@ -246,7 +246,7 @@ class CreateAndUpdateVacancyTest(APITestCase):
url = '/api/vacancies/' + str(new_vacancy.pk) + '/' url = '/api/vacancies/' + str(new_vacancy.pk) + '/'
response = self.client.patch(url, {'open_time': self.today, 'close_time': self.yesterday, response = self.client.patch(url, {'open_time': self.today, 'close_time': self.yesterday,
'name': 'new_vacancy2', 'description': 'new_vacancy2', 'amount': 'sepuluh', 'name': 'new vacancy', 'description': 'new_vacancy2', 'amount': 'sepuluh',
'salary': 'dua juta', 'requirements': 'new_vacancy', 'salary': 'dua juta', 'requirements': 'new_vacancy',
'max_accepted_applicants': 3, 'working_period': '3 Bulan'}, format='json') 'max_accepted_applicants': 3, 'working_period': '3 Bulan'}, format='json')
self.assertEqual(response.status_code, status.HTTP_400_BAD_REQUEST) self.assertEqual(response.status_code, status.HTTP_400_BAD_REQUEST)
...@@ -262,7 +262,7 @@ class CreateAndUpdateVacancyTest(APITestCase): ...@@ -262,7 +262,7 @@ class CreateAndUpdateVacancyTest(APITestCase):
url = '/api/vacancies/' url = '/api/vacancies/'
response = self.client.post(url, {'company': new_company.pk, 'open_time': self.today, response = self.client.post(url, {'company': new_company.pk, 'open_time': self.today,
'close_time': self.today, 'name': 'new_vacancy', 'description': 'new_vacancy', 'close_time': self.today, 'name': 'new vacancy', 'description': 'new_vacancy',
'max_accepted_applicants': 3, 'working_period': '3 Bulan'}, format='json') 'max_accepted_applicants': 3, 'working_period': '3 Bulan'}, format='json')
self.assertEqual(response.status_code, status.HTTP_400_BAD_REQUEST) self.assertEqual(response.status_code, status.HTTP_400_BAD_REQUEST)
...@@ -278,7 +278,7 @@ class CreateAndUpdateVacancyTest(APITestCase): ...@@ -278,7 +278,7 @@ class CreateAndUpdateVacancyTest(APITestCase):
url = '/api/vacancies/' url = '/api/vacancies/'
response = self.client.post(url, {'company': new_company.pk, 'open_time': datetime.fromtimestamp(0), response = self.client.post(url, {'company': new_company.pk, 'open_time': datetime.fromtimestamp(0),
'close_time': datetime.fromtimestamp(0), 'name': 'new_vacancy', 'close_time': datetime.fromtimestamp(0), 'name': 'new vacancy',
'description': 'new_vacancy', 'description': 'new_vacancy',
'max_accepted_applicants': 3, 'working_period': '3 Bulan'}, format='json') 'max_accepted_applicants': 3, 'working_period': '3 Bulan'}, format='json')
...@@ -299,7 +299,7 @@ class CreateAndUpdateVacancyTest(APITestCase): ...@@ -299,7 +299,7 @@ class CreateAndUpdateVacancyTest(APITestCase):
url = '/api/vacancies/' + str(new_vacancy.pk) + '/' url = '/api/vacancies/' + str(new_vacancy.pk) + '/'
response = self.client.patch(url, {'open_time': self.today, 'close_time': self.today, response = self.client.patch(url, {'open_time': self.today, 'close_time': self.today,
'name': 'new_vacancy2', 'description': 'new_vacancy2', 'name': 'new vacancy', 'description': 'new_vacancy2',
'requirements': 'new_vacancy2', 'requirements': 'new_vacancy2',
'max_accepted_applicants': 3, 'working_period': '3 Bulan'}, format='json') 'max_accepted_applicants': 3, 'working_period': '3 Bulan'}, format='json')
...@@ -319,7 +319,7 @@ class CreateAndUpdateVacancyTest(APITestCase): ...@@ -319,7 +319,7 @@ class CreateAndUpdateVacancyTest(APITestCase):
response = self.client.patch(url, response = self.client.patch(url,
{'open_time': datetime.fromtimestamp(0), 'close_time': datetime.fromtimestamp(0), {'open_time': datetime.fromtimestamp(0), 'close_time': datetime.fromtimestamp(0),
'name': 'new_vacancy2', 'description': 'new_vacancy2', 'amount': 'sepuluh', 'name': 'new vacancy', 'description': 'new_vacancy2', 'amount': 'sepuluh',
'requirements': 'new_vacancy2', 'requirements': 'new_vacancy2',
'max_accepted_applicants': 3, 'working_period': '3 Bulan'}, format='json') 'max_accepted_applicants': 3, 'working_period': '3 Bulan'}, format='json')
self.assertEqual(response.status_code, status.HTTP_400_BAD_REQUEST) self.assertEqual(response.status_code, status.HTTP_400_BAD_REQUEST)
...@@ -338,7 +338,7 @@ class CreateAndUpdateVacancyTest(APITestCase): ...@@ -338,7 +338,7 @@ class CreateAndUpdateVacancyTest(APITestCase):
max_accepted_applicants=3) max_accepted_applicants=3)
url = '/api/vacancies/' + str(new_vacancy.pk) + '/' url = '/api/vacancies/' + str(new_vacancy.pk) + '/'
response = self.client.patch(url, {'open_time': self.today, 'close_time': self.tomorrow, 'name': 'new_vacancy2', response = self.client.patch(url, {'open_time': self.today, 'close_time': self.tomorrow, 'name': 'new vacancy',
'description': 'new_vacancy2', 'amount': 'sepuluh', 'description': 'new_vacancy2', 'amount': 'sepuluh',
'benefits': 'new_vacancy2', 'requirements': 'new_vacancy', 'benefits': 'new_vacancy2', 'requirements': 'new_vacancy',
'working_period': '3 Bulan', 'max_accepted_applicants': 3}, format='json') 'working_period': '3 Bulan', 'max_accepted_applicants': 3}, format='json')
...@@ -359,7 +359,7 @@ class CreateAndUpdateVacancyTest(APITestCase): ...@@ -359,7 +359,7 @@ class CreateAndUpdateVacancyTest(APITestCase):
url = '/api/vacancies/' + str(new_vacancy.pk) + '/' url = '/api/vacancies/' + str(new_vacancy.pk) + '/'
response = self.client.patch(url, {'open_time': self.today, 'close_time': self.tomorrow, response = self.client.patch(url, {'open_time': self.today, 'close_time': self.tomorrow,
'name': 'new_vacancy2', 'description': 'new_vacancy2', 'name': 'new vacancy', 'description': 'new_vacancy2',
'responsibilities': 'new_vacancy2', 'amount': 'sepuluh', 'responsibilities': 'new_vacancy2', 'amount': 'sepuluh',
'requirements': 'new_vacancy2', 'requirements': 'new_vacancy2',
'max_accepted_applicants': 3, 'working_period': '3 Bulan'}, format='json') 'max_accepted_applicants': 3, 'working_period': '3 Bulan'}, format='json')
...@@ -398,7 +398,7 @@ class CreateAndUpdateVacancyTest(APITestCase): ...@@ -398,7 +398,7 @@ class CreateAndUpdateVacancyTest(APITestCase):
url = '/api/vacancies/' + str(new_vacancy.pk) + '/' url = '/api/vacancies/' + str(new_vacancy.pk) + '/'
response = self.client.patch(url, {'open_time': self.yesterday, 'close_time': self.today, response = self.client.patch(url, {'open_time': self.yesterday, 'close_time': self.today,
'name': 'new_vacancy2', 'description': 'new_vacancy2', 'name': 'new vacancy', 'description': 'new_vacancy2',
'responsibilities': 'new_vacancy2', 'requirements': 'new_vacancy2', 'responsibilities': 'new_vacancy2', 'requirements': 'new_vacancy2',
'max_accepted_applicants': 3, 'working_period': '3 Bulan'}, format='json') 'max_accepted_applicants': 3, 'working_period': '3 Bulan'}, format='json')
self.assertEqual(response.status_code, status.HTTP_400_BAD_REQUEST) self.assertEqual(response.status_code, status.HTTP_400_BAD_REQUEST)
...@@ -418,7 +418,7 @@ class CreateAndUpdateVacancyTest(APITestCase): ...@@ -418,7 +418,7 @@ class CreateAndUpdateVacancyTest(APITestCase):
url = '/api/vacancies/' + str(new_vacancy.pk) + '/' url = '/api/vacancies/' + str(new_vacancy.pk) + '/'
response = self.client.patch(url, {'open_time': self.today, 'close_time': self.tomorrow, response = self.client.patch(url, {'open_time': self.today, 'close_time': self.tomorrow,
'name': 'new_vacancy2', 'description': 'new_vacancy2', 'amount': 10, 'name': 'new vacancy', 'description': 'new_vacancy2', 'amount': 10,
'responsibilities': 'new_vacancy2', 'requirements': 'new_vacancy2', 'responsibilities': 'new_vacancy2', 'requirements': 'new_vacancy2',
'max_accepted_applicants': 3, 'working_period': '3 Bulan'}, format='json') 'max_accepted_applicants': 3, 'working_period': '3 Bulan'}, format='json')
self.assertEqual(response.status_code, status.HTTP_200_OK) self.assertEqual(response.status_code, status.HTTP_200_OK)
......
...@@ -92,133 +92,108 @@ class VacancyViewSet(MultiSerializerViewSetMixin, viewsets.ModelViewSet): ...@@ -92,133 +92,108 @@ class VacancyViewSet(MultiSerializerViewSetMixin, viewsets.ModelViewSet):
if len(companies) > 0: if len(companies) > 0:
vacancies = vacancies.filter(company__id__in=companies) vacancies = vacancies.filter(company__id__in=companies)
return vacancies return vacancies
def sort(self, order_by, vacancies, order): def sort(self, order_by, vacancies, order):
if order_by is not None and order_by in ['name', 'salary']: if (order_by is not None) and (order_by in ['name', 'salary']) and (order in ['ascending', 'descending']):
if order in ['ascending', 'descending']: order_query = ""
order_query = "" if order == 'descending':
if order == 'descending': order_query = "-"
order_query = "-" return vacancies.order_by('{}{}'.format(order_query, order_by))
return vacancies.order_by('{}{}'.format(order_query, order_by))
return vacancies return vacancies
def name_position_validator(self, names): def name_position_validator(self, names):
for name in names.split(" "): for name in names.split(" "):
if not name.isalpha(): if not name.isalpha():
raise serializers.ValidationError("Name must alphabets only") raise ValidationError("Name must alphabets only")
return name return name
def salary_validator(self, salary): def salary_validator(self, salary):
if not isinstance(salary, int): if not isinstance(salary, int):
raise serializers.ValidationError("Salary must number only") raise ValidationError("Salary must number only")
def amount_validator(self, amount): def amount_validator(self, amount):
if not isinstance(amount, int): if not isinstance(amount, int):
raise serializers.ValidationError("amount must number only") raise ValidationError("Amount must number only")
def create(self, request): def responsibilities_validator(self, responsibilities):
data = request.data if not isinstance(responsibilities, basestring):
print("[LOG] data: " + str(data)) raise ValidationError("Responsibilities must be string")
company_set = Company.objects.filter(id=data['company'])
if len(company_set) == 0: def recruiter_activity_validator(self, recruiter_activity):
raise ValidationError('no company')
company = company_set[0]
open_time = data['open_time']
close_time = data['close_time']
name = data['name']
self.name_position_validator(name)
salary = data.get('salary') or 0
self.salary_validator(salary)
description = data['description']
working_period = data['working_period']
tag = ''
try:
tag = data['tag']
except:
print("Tag leaved in blank")
max_accepted_applicants = data['max_accepted_applicants']
date_validity = date_validator(open_time, close_time)
if not date_validity['is_valid']:
return Response({'error': date_validity['error']}, status=date_validity['status'])
vacancy = Vacancy(company=company, open_time=open_time, close_time=close_time, name=name,
description=description, salary=salary, working_period=working_period, tag=tag,
max_accepted_applicants=max_accepted_applicants)
if 'benefits' in data:
vacancy.benefits = data['benefits']
if 'amount' in data:
if isinstance(data['amount'], int):
vacancy.amount = data['amount']
self.amount_validator(data['amount'])
else:
return Response(status=status.HTTP_400_BAD_REQUEST)
if 'responsibilities' in data:
if isinstance(data['responsibilities'], basestring):
vacancy.responsibilities = data['responsibilities']
else:
return Response(status=status.HTTP_400_BAD_REQUEST)
enum_recruiter_activity = ['Selalu', 'Sering', 'Kadang', 'Jarang', 'Tidak Pernah'] enum_recruiter_activity = ['Selalu', 'Sering', 'Kadang', 'Jarang', 'Tidak Pernah']
if 'recruiter_activity' in data: if (not isinstance(recruiter_activity, basestring)) or (recruiter_activity not in enum_recruiter_activity):
if isinstance(data['recruiter_activity'], basestring): raise ValidationError('Tingkat Respons Perekrut harus salah '
if data['recruiter_activity'] in enum_recruiter_activity:
vacancy.recruiter_activity = data['recruiter_activity']
else:
return Response({'error': 'Tingkat Respons Perekrut harus salah '
'satu dari Selalu, Sering, Kadang, ' 'satu dari Selalu, Sering, Kadang, '
'Jarang, dan Tidak Pernah!'}, status=status.HTTP_400_BAD_REQUEST) 'Jarang, dan Tidak Pernah!')
else:
return Response({'error': 'Tingkat Respons Perekrut harus salah ' def date_range_validator(self, open_time, close_time):
'satu dari Selalu, Sering, Kadang, ' validity = date_validator(open_time, close_time)
'Jarang, dan Tidak Pernah!'}, status=status.HTTP_400_BAD_REQUEST) if not validity['is_valid']:
raise ValidationError(validity['error'])
def __get_company(self, company_id):
company_set = Company.objects.filter(id=company_id)
if len(company_set) == 0:
raise ValidationError('No company exists with that ID')
return company_set[0]
def __parse_vacancy_data(self, raw_data):
data = {
"open_time": raw_data['open_time'],
"close_time": raw_data['close_time'],
"name": raw_data['name'],
"salary": raw_data.get('salary', 0),
"description": raw_data['description'],
"working_period": raw_data['working_period'],
"max_accepted_applicants": raw_data['max_accepted_applicants']
}
if 'benefits' in raw_data:
data['benefits'] = raw_data['benefits']
if 'amount' in raw_data:
data['amount'] = raw_data['amount']
if 'responsibilities' in raw_data:
data['responsibilities'] = raw_data['responsibilities']
if 'recruiter_activity' in raw_data:
data['recruiter_activity'] = raw_data['recruiter_activity']
return data
def __validate_vacancy_data(self, data):
self.date_range_validator(data['open_time'], data['close_time'])
self.name_position_validator(data['name'])
self.salary_validator(data['salary'])
if data.get('amount'):
self.amount_validator(data['amount'])
if data.get('responsibilities'):
self.responsibilities_validator(data['responsibilities'])
if data.get('recruiter_activity'):
self.recruiter_activity_validator(data['recruiter_activity'])
vacancy.save() def create(self, request):
print("[LOG] data: " + str(request.data))
try:
data = self.__parse_vacancy_data(request.data)
data['company'] = self.__get_company(request.data['company'])
data['tag'] = request.data.get('tag', '')
self.__validate_vacancy_data(data)
vacancy = Vacancy(**data)
vacancy.save()
except ValidationError as e:
print("[LOG] error: " + str(e))
return Response({"error": str(e.detail[0])}, status=status.HTTP_400_BAD_REQUEST)
return Response(status=status.HTTP_200_OK) return Response(status=status.HTTP_200_OK)
def partial_update(self, request, pk): def partial_update(self, request, pk):
data = request.data print("[LOG] data: " + str(request.data))
vacancy = Vacancy.objects.get(pk=pk) try:
open_time = data['open_time'] data = self.__parse_vacancy_data(request.data)
salary = data.get('salary') or 0 self.__validate_vacancy_data(data)
close_time = data['close_time'] vacancy = Vacancy.objects.get(pk=pk)
name = data['name'] for (key, value) in data.items():
description = data['description'] setattr(vacancy, key, value)
working_period = data['working_period'] vacancy.save()
requirements = data['requirements'] except ValidationError as e:
max_accepted_applicants = data['max_accepted_applicants'] print("[LOG] error: " + str(e))
date_validity = date_validator(open_time, close_time) return Response({"error": str(e.detail[0])}, status=status.HTTP_400_BAD_REQUEST)
if not date_validity['is_valid']:
return Response({'error': date_validity['error']}, status=date_validity['status'])
vacancy.open_time = open_time
vacancy.close_time = close_time
vacancy.name = name
vacancy.salary = salary
vacancy.description = description
vacancy.max_accepted_applicants = max_accepted_applicants
vacancy.working_period = working_period
vacancy.responsibilities = data.get('responsibilities')
if 'benefits' in data:
vacancy.benefits = data['benefits']
vacancy.requirements = requirements
if 'amount' in data:
if isinstance(data['amount'], int):
vacancy.amount = data['amount']
else:
return Response(status=status.HTTP_400_BAD_REQUEST)
enum_recruiter_activity = ['Selalu', 'Sering', 'Kadang', 'Jarang', 'Tidak Pernah']
if 'recruiter_activity' in data:
if isinstance(data['recruiter_activity'], basestring):
if data['recruiter_activity'] in enum_recruiter_activity:
vacancy.recruiter_activity = data['recruiter_activity']
else:
return Response({'error': 'Tingkat Respons Perekrut harus salah '
'satu dari Selalu, Sering, Kadang, '
'Jarang, dan Tidak Pernah!'}, status=status.HTTP_400_BAD_REQUEST)
else:
return Response({'error': 'Tingkat Respons Perekrut harus salah '
'satu dari Selalu, Sering, Kadang, '
'Jarang, dan Tidak Pernah!'}, status=status.HTTP_400_BAD_REQUEST)
vacancy.save()
return Response(status=status.HTTP_200_OK) return Response(status=status.HTTP_200_OK)
@detail_route(permission_classes=[IsAdminOrCompany]) @detail_route(permission_classes=[IsAdminOrCompany])
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment