feat: upgrade frontend

This commit is contained in:
naiba
2025-03-15 22:31:16 +08:00
parent 8f88db4f18
commit c3ec52e392
2 changed files with 3 additions and 5 deletions

View File

@@ -1,7 +1,6 @@
package controller
import (
"context"
"fmt"
"io"
"net/http"
@@ -193,13 +192,12 @@ func oauth2callback(jwtConfig *jwt.GinJWTMiddleware) func(c *gin.Context) (any,
func exchangeOpenId(c *gin.Context, o2confRaw *model.Oauth2Config,
callbackData *model.Oauth2Callback, redirectURL string) (string, error) {
o2conf := o2confRaw.Setup(redirectURL)
ctx := context.Background()
otk, err := o2conf.Exchange(ctx, callbackData.Code)
otk, err := o2conf.Exchange(c, callbackData.Code)
if err != nil {
return "", err
}
oauth2client := o2conf.Client(ctx, otk)
oauth2client := o2conf.Client(c, otk)
resp, err := oauth2client.Get(o2confRaw.UserInfoURL)
if err != nil {
return "", err

View File

@@ -9,7 +9,7 @@
name: "Official"
repository: "https://github.com/hamster1963/nezha-dash-v1"
author: "hamster1963"
version: "v1.23.0"
version: "v1.24.0"
is_official: true
- path: "nezha-ascii-dist"
name: "Nezha-ASCII"