Skip to content

Commit 6a1e91b

Browse files
committed
Make validateToken public
1 parent 0b8b59c commit 6a1e91b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

handlers/playground.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212
)
1313

1414
func NewPlayground(rw http.ResponseWriter, req *http.Request) {
15-
if !validateToken(req) {
15+
if !ValidateToken(req) {
1616
rw.WriteHeader(http.StatusForbidden)
1717
return
1818
}
@@ -37,7 +37,7 @@ func NewPlayground(rw http.ResponseWriter, req *http.Request) {
3737
}
3838

3939
func ListPlaygrounds(rw http.ResponseWriter, req *http.Request) {
40-
if !validateToken(req) {
40+
if !ValidateToken(req) {
4141
rw.WriteHeader(http.StatusForbidden)
4242
return
4343
}
@@ -78,7 +78,7 @@ func GetCurrentPlayground(rw http.ResponseWriter, req *http.Request) {
7878
})
7979
}
8080

81-
func validateToken(req *http.Request) bool {
81+
func ValidateToken(req *http.Request) bool {
8282
_, password, ok := req.BasicAuth()
8383
if !ok {
8484
return false

0 commit comments

Comments
 (0)