Skip to content

Commit

Permalink
fixed wrong type in passings
Browse files Browse the repository at this point in the history
fixed api wrong type
  • Loading branch information
agmes4 committed Sep 25, 2024
1 parent 430846f commit 6a614db
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions web/api/v0/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ def post(self, user_id: int, password: str, mac: str, name: str) -> ResponseRetu
if not user.wifi_password:
abort(400, message="Legacy wifi password change of password is required.")

mpsk_client_create(session, user, mac, name, user)
mpsk_client_create(session.session, user, mac, name, user)
session.session.commit()
except InvalidMACAddressException:
abort(400, message="Invalid MAC address.")
Expand Down Expand Up @@ -379,7 +379,7 @@ def post(self, user_id: int, mpsk_id: int, password: str) -> ResponseReturnValue
if not user == mpsk.owner:
abort(401, message="You are not the owner of the mpsk.")

mpsk_delete(session, mpsk, user)
mpsk_delete(session.session, mpsk, user)
session.session.commit()

return "mpsk client was deleted"
Expand Down Expand Up @@ -409,7 +409,7 @@ def post(
)

try:
mpsk_edit(session, mpsk, user, name, mac, user)
mpsk_edit(session.session, mpsk, user, name, mac, user)
session.session.commit()
except InvalidMACAddressException:
abort(400, message="Invalid MAC address.")
Expand Down

0 comments on commit 6a614db

Please sign in to comment.