Skip to content

Commit

Permalink
Update regex to allow for spaces and plus signs, and remove the hash …
Browse files Browse the repository at this point in the history
…before booking.
  • Loading branch information
MelissaAutumn committed Jun 26, 2024
1 parent a68bfd1 commit ce2c3bd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion backend/src/appointment/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def setup_encryption_engine():

def retrieve_user_url_data(url):
"""Retrieves username, signature, and main url from /<username>/<signature>/"""
pattern = r"[\/]([\w\d\-_\.\@!]+)[\/]?([\w\d\-_\.\@!]*)[\/]?$"
pattern = r"[\/]([\w\d\-_\.\@!\+\%]+)[\/]?([\w\d\-_\.\@!\+]*)[\/]?$"
match = re.findall(pattern, url)

if match is None or len(match) == 0:
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/views/BookingView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -183,9 +183,10 @@ const bookEvent = async (attendeeData) => {
attendee: attendeeData,
};
const url = window.location.href.split('#')[0];
const request = call('schedule/public/availability/request').put({
s_a: obj,
url: window.location.href,
url,
});
// Data should just be true here.
Expand Down

0 comments on commit ce2c3bd

Please sign in to comment.