Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include session param in websockets handlers #563

Merged
merged 2 commits into from
Nov 18, 2024

Conversation

callmephilip
Copy link
Contributor


name: Pull Request
about: Propose changes to the codebase
title: '[PR] '
labels: ''
assignees: ''


Related Issue
In order to access session data in ws handler right now, you need to drill into ws.session. While standard route handlers provide session/sess shortcut, ws handlers do not.

Proposed Changes
This PR adds support for session/sess param inside ws handlers. Includes a quick test + doc

Types of changes
What types of changes does your code introduce? Put an x in all the boxes that apply:

  • New feature (non-breaking change which adds functionality)

Checklist
Go over all the following points, and put an x in all the boxes that apply:

  • My code follows the code style of this project.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • I am aware that this is an nbdev project, and I have edited, cleaned, and synced the source notebooks instead of editing .py or .md files directly.

Copy link

gitnotebooks bot commented Nov 4, 2024

Found 2 changed notebooks. Review the changes at https://app.gitnotebooks.com/AnswerDotAI/fasthtml/pull/563

@jph00 jph00 merged commit 5d7b9d6 into AnswerDotAI:main Nov 18, 2024
1 check passed
@jph00 jph00 changed the title Incl session param in ws Include session param in websockets handlers Nov 18, 2024
@jph00 jph00 added the enhancement New feature or request label Nov 18, 2024
@jph00
Copy link
Contributor

jph00 commented Nov 18, 2024

Good idea! :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants