Skip to content

Commit

Permalink
fix(User):fixed remove member
Browse files Browse the repository at this point in the history
  • Loading branch information
dweinholz committed Oct 27, 2023
1 parent ece33ea commit 9a444a6
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion FastapiOpenRestyConfigurator/app/main/service/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,13 @@ async def add_user(backend_id, user_id):

async def delete_user(backend_id, user_id):
backend_id = secure_filename(str(backend_id))
user_id = secure_filename(str(user_id))
if "@" in user_id:
user_id_parts = user_id.split("@")
user_id_part1 = secure_filename(user_id_parts[0])
user_id_part2 = secure_filename(user_id_parts[1])
user_id = f"{user_id_part1}@{user_id_part2}"
else:
user_id = secure_filename(str(user_id))
user_id_path = f"{settings.FORC_USER_PATH}/{backend_id}"
user_file_name = f"{user_id}"
user_file_path = f"{user_id_path}/{user_file_name}"
Expand Down

0 comments on commit 9a444a6

Please sign in to comment.