File tree Expand file tree Collapse file tree 2 files changed +2
-12
lines changed
internals/proxy/middlewares Expand file tree Collapse file tree 2 files changed +2
-12
lines changed Original file line number Diff line number Diff line change 44 "encoding/base64"
55 "net/http"
66 "net/url"
7+ "slices"
78 "strings"
89
9- "github.com/codeshelldev/secured-signal-api/utils"
1010 log "github.com/codeshelldev/secured-signal-api/utils/logger"
1111)
1212
@@ -36,7 +36,7 @@ func getAuthType(str string) authType {
3636}
3737
3838func isValidToken (tokens []string , match string ) (bool ) {
39- return utils .Contains (tokens , match )
39+ return slices .Contains (tokens , match )
4040}
4141
4242func (data AuthMiddleware ) Use () http.Handler {
Original file line number Diff line number Diff line change @@ -30,16 +30,6 @@ func StringToArray(sliceStr string) ([]string, error) {
3030 return tokens , nil
3131}
3232
33- func Contains [T comparable ](list []T , item T ) (bool ){
34- for _ , match := range list {
35- if match == item {
36- return true
37- }
38- }
39-
40- return false
41- }
42-
4333func GetJsonSafe [T any ](jsonStr string ) (T , error ) {
4434 var result T
4535
You can’t perform that action at this time.
0 commit comments