Skip to content

Commit

Permalink
fix: access token (#245)
Browse files Browse the repository at this point in the history
Co-authored-by: GitHub Actions <[email protected]>
  • Loading branch information
ruuushhh and GitHub Actions committed Jan 31, 2025
1 parent 70bedcd commit a70d87c
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions apps/fyle/helpers.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import json
import requests
from typing import List

import requests
from django.conf import settings
from django.db.models import Q

from fyle_integrations_platform_connector import PlatformConnector
from rest_framework.exceptions import ValidationError

from apps.workspaces.models import Workspace, FyleCredential, ExportSetting
from apps.accounting_exports.models import AccountingExport
from apps.fyle.models import ExpenseFilter
from apps.fyle.constants import DEFAULT_FYLE_CONDITIONS
from apps.fyle.models import ExpenseFilter
from apps.workspaces.models import ExportSetting, FyleCredential, Workspace


def construct_expense_filter(expense_filter):
Expand Down Expand Up @@ -123,7 +123,7 @@ def post_request(url, body, refresh_token=None):
response = requests.post(
url,
headers=api_headers,
data=body
data=json.dumps(body)
)

if response.status_code == 200:
Expand Down Expand Up @@ -177,7 +177,7 @@ def get_access_token(refresh_token: str) -> str:
'client_secret': settings.FYLE_CLIENT_SECRET
}

return post_request(settings.FYLE_TOKEN_URI, body=json.dumps(api_data))['access_token']
return post_request(settings.FYLE_TOKEN_URI, body=api_data)['access_token']


def get_cluster_domain(refresh_token: str) -> str:
Expand Down

0 comments on commit a70d87c

Please sign in to comment.