Skip to content

Commit

Permalink
update function name
Browse files Browse the repository at this point in the history
  • Loading branch information
mattkasun committed Apr 3, 2023
1 parent d82e3a9 commit c2a4cb1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion controllers/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ func updateUser(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "application/json")
var params = mux.Vars(r)
// start here
jwtUser, _, isadmin, err := logic.VerifyJWS(r.Header.Get("Authorization"))
jwtUser, _, isadmin, err := logic.VerifyJWT(r.Header.Get("Authorization"))
if err != nil {
logger.Log(0, "verifyJWT error", err.Error())
logic.ReturnErrorResponse(w, r, logic.FormatError(err, "internal"))
Expand Down
2 changes: 1 addition & 1 deletion logic/jwts.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ func CreateUserJWT(username string, networks []string, isadmin bool) (response s
}

// VerifyJWT verifies Auth Header
func VerifyJWS(bearerToken string) (username string, networks []string, isadmin bool, err error) {
func VerifyJWT(bearerToken string) (username string, networks []string, isadmin bool, err error) {
token := ""
tokenSplit := strings.Split(bearerToken, " ")
if len(tokenSplit) > 1 {
Expand Down

0 comments on commit c2a4cb1

Please sign in to comment.