mirror of
https://github.com/safing/portbase
synced 2025-09-10 14:57:46 +00:00
Implement review suggestions
This commit is contained in:
parent
5daeac8cf7
commit
3244fefd43
10 changed files with 118 additions and 111 deletions
|
@ -1,7 +1,6 @@
|
|||
package api
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"net/http"
|
||||
|
@ -14,7 +13,7 @@ var (
|
|||
testToken = new(AuthToken)
|
||||
)
|
||||
|
||||
func testAuthenticator(ctx context.Context, s *http.Server, r *http.Request) (*AuthToken, error) {
|
||||
func testAuthenticator(r *http.Request, s *http.Server) (*AuthToken, error) {
|
||||
switch {
|
||||
case testToken.Read == -127 || testToken.Write == -127:
|
||||
return nil, errors.New("test error")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue