Skip to content

Commit

Permalink
Docs revision
Browse files Browse the repository at this point in the history
  • Loading branch information
na-stewart committed Jan 15, 2025
1 parent 3a3dc9e commit 3693922
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ async def on_check_perms(request):
authentication_session = await check_permissions(
request, "channels:view", "voice:*"
)
return text("Account is authorized.")
return json("Account is authorized.", authentication_session.json)
```
* Require Permissions (This method is not called directly and instead used as a decorator.)
Expand All @@ -538,7 +538,7 @@ async def on_check_perms(request):
@app.post("api/security/perms")
@requires_permission("channels:view", "voice:*")
async def on_check_perms(request):
return text("Account is authorized.")
return json("Account is authorized.", request.ctx.session)
```
* Check Roles
Expand All @@ -547,7 +547,7 @@ async def on_check_perms(request):
@app.post("api/security/roles")
async def on_check_roles(request):
authentication_session = await check_roles(request, "Chat Room Moderator")
return text("Account is authorized.")
return json("Account is authorized.", authentication_session.json)
```
* Require Roles (This method is not called directly and instead used as a decorator)
Expand All @@ -556,7 +556,7 @@ async def on_check_roles(request):
@app.post("api/security/roles")
@requires_role("Chat Room Moderator")
async def on_check_roles(request):
return text("Account is authorized.")
return json("Account is authorized.", request.ctx.session)
```
## Testing
Expand Down

0 comments on commit 3693922

Please sign in to comment.