Skip to content

Commit

Permalink
add loggers to connection payload (#207)
Browse files Browse the repository at this point in the history
  • Loading branch information
Hrishabh17 authored Jul 30, 2024
1 parent 57ab3f7 commit dbda2cc
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions apps/bamboohr/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,11 @@ def post(self, request, *args, **kwargs):
api_token = request.data['input']['api_token']
sub_domain = request.data['input']['subdomain']

logger.info('Bamboo HR Connection Request Payload | Content: {{api_token: {0}, sub_domain: {1}}}'.format(api_token, sub_domain))

bamboohrsdk = BambooHrSDK(api_token=api_token, sub_domain=sub_domain)
timeoff = bamboohrsdk.time_off.get()
logger.info('Bamboo HR Connection Timeoff Response | Content: {0}'.format(timeoff))
if timeoff.get('timeOffTypes', None):
bamboohr, _ = BambooHr.objects.update_or_create(org=org, defaults={
'api_token': api_token,
Expand Down

0 comments on commit dbda2cc

Please sign in to comment.