mirror of
https://github.com/Buriburizaem0n/nezha_domains.git
synced 2026-02-04 20:50:06 +00:00
✨ 一键脚本
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
||||
"context"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"strings"
|
||||
|
||||
"github.com/naiba/com"
|
||||
|
||||
@@ -68,8 +69,8 @@ func (oa *oauth2controller) callback(c *gin.Context) {
|
||||
}
|
||||
var isAdmin bool
|
||||
if gu.GetID() > 0 {
|
||||
for i := 0; i < len(dao.Conf.GitHub.Admin); i++ {
|
||||
if gu.GetID() == dao.Conf.GitHub.Admin[i] {
|
||||
for _, admin := range strings.Split(dao.Conf.GitHub.Admin, ",") {
|
||||
if fmt.Sprintf("%d", gu.GetID()) == admin {
|
||||
isAdmin = true
|
||||
break
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user