Skip to content

Commit

Permalink
fixed urls
Browse files Browse the repository at this point in the history
  • Loading branch information
XaelShan committed Jun 30, 2023
1 parent 7bac6ca commit b0ce130
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 1 addition & 2 deletions webfit/data/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
logger = logging.getLogger(__name__)

urlpatterns = [
re_path(r"import/(?P<file_id>)/$", views.import_file_string, name = "import data"),
re_path(r"import/(?P<file_id>)/(?P<opt_in>)/$", views.import_file_string, name = "import data and opt in"),
path("import/", views.import_file_string, name = "import data"),
path("export/", views.export_data, name = "export/save data")
]
4 changes: 3 additions & 1 deletion webfit/data/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@


@api_view(['POST', 'PUT'])
def import_file_string(request, file_id, version, optional_parameter='opt_in'):
def import_file_string(request, version):

#check login

#saves file_string
if request.method == 'POST':
serializer = DataSerializers(file_string=file_id)
Expand Down

0 comments on commit b0ce130

Please sign in to comment.