Skip to content

Commit

Permalink
#315: Fix = typo in examples, and add Disable logging functions to psd1
Browse files Browse the repository at this point in the history
  • Loading branch information
Badgerati committed Aug 4, 2019
1 parent fff466e commit 5f96e98
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/Tutorials/Routes/FlashMessages.md
Expand Up @@ -78,7 +78,7 @@ When doing authentication checks, normally if the check fails Pode will throw an
For example, here we have a login page, with the `POST` login check. The check flags that any authentication errors should be loaded into the session's flash messages:

```powershell
$auth_login = Get-PodeAuthMiddleware -Name 'Login' -AutoLogin -SuccessUrl = '/'
$auth_login = Get-PodeAuthMiddleware -Name 'Login' -AutoLogin -SuccessUrl '/'
Add-PodeRoute -Method Get -Path '/login' -Middleware $auth_login -ScriptBlock {
Write-PodeViewResponse -Path 'auth-login' -FlashMessages
}
Expand Down
4 changes: 2 additions & 2 deletions docs/Tutorials/Routes/LoginPage.md
Expand Up @@ -89,7 +89,7 @@ For the `GET` Route we supply `-AutoLogin`, this basically means if the user nav

```powershell
# the login page itself
$auth_login = Get-PodeAuthMiddleware -Name 'Login' -AutoLogin -SuccessUrl = '/'
$auth_login = Get-PodeAuthMiddleware -Name 'Login' -AutoLogin -SuccessUrl '/'
Add-PodeRoute -Method Get -Path '/login' -Middleware $auth_login -ScriptBlock {
Write-PodeViewResponse -Path 'auth-login' -FlashMessages
}
Expand Down Expand Up @@ -158,7 +158,7 @@ Start-PodeServer -Thread 2 {
}
# the "GET /login" endpoint for the login page
$auth_login = Get-PodeAuthMiddleware -Name 'Login' -AutoLogin -SuccessUrl = '/'
$auth_login = Get-PodeAuthMiddleware -Name 'Login' -AutoLogin -SuccessUrl '/'
Add-PodeRoute -Method Get -Path '/login' -Middleware $auth_login -ScriptBlock {
Write-PodeViewResponse -Path 'auth-login' -FlashMessages
}
Expand Down
2 changes: 1 addition & 1 deletion examples/web-auth-form-ad.ps1
Expand Up @@ -50,7 +50,7 @@ Start-PodeServer -Threads 2 {
# the login flag set below checks if there is already an authenticated session cookie. If there is, then
# the user is redirected to the home page. If there is no session then the login page will load without
# checking user authetication (to prevent a 401 status)
$auth_login = Get-PodeAuthMiddleware -Name 'Login' -AutoLogin -SuccessUrl = '/'
$auth_login = Get-PodeAuthMiddleware -Name 'Login' -AutoLogin -SuccessUrl '/'

Add-PodeRoute -Method Get -Path '/login' -Middleware $auth_login -ScriptBlock {
Write-PodeViewResponse -Path 'auth-login' -FlashMessages
Expand Down
2 changes: 1 addition & 1 deletion examples/web-auth-form.ps1
Expand Up @@ -65,7 +65,7 @@ Start-PodeServer -Threads 2 {
# the login flag set below checks if there is already an authenticated session cookie. If there is, then
# the user is redirected to the home page. If there is no session then the login page will load without
# checking user authetication (to prevent a 401 status)
$auth_login = Get-PodeAuthMiddleware -Name 'Login' -AutoLogin -SuccessUrl = '/'
$auth_login = Get-PodeAuthMiddleware -Name 'Login' -AutoLogin -SuccessUrl '/'

Add-PodeRoute -Method Get -Path '/login' -Middleware $auth_login -ScriptBlock {
Write-PodeViewResponse -Path 'auth-login' -FlashMessages
Expand Down
2 changes: 2 additions & 0 deletions src/Pode.psd1
Expand Up @@ -144,6 +144,8 @@
'New-PodeLoggingMethod',
'Enable-PodeRequestLogging',
'Enable-PodeErrorLogging',
'Disable-PodeRequestLogging',
'Disable-PodeErrorLogging',
'Add-PodeLogger',
'Remove-PodeLogger',
'Clear-PodeLoggers',
Expand Down

0 comments on commit 5f96e98

Please sign in to comment.