UPchieve/web

End session button can be clicked over and over (making many API calls)

Closed this issue · 1 comments

jkeat commented

It's possible to spam the "End session" / "Cancel session" button in sessions (because it doesn't become disabled or disappear after being clicked once)

This causes multiple "ended session" user actions to be generated (among other potential issues)

A related issue that will come up when trying to resolve this is - when clicking "End session" before the URI changes to one with a session id (meaning before the requested session is created in the database) e.g:
session/math/algebra ---> session/math/algebra/5e7e28b18942715e9ead2e30

we end up grabbing the session id of a session that has not been created yet. Making thesessionId equal to null and causing an error which would prompt the "Could not end session" alert