feat: change challenge method in certificate management page

This commit is contained in:
0xJacky 2023-12-03 20:49:02 +08:00
parent 002d9c22ab
commit 5b3cd981e9
No known key found for this signature in database
GPG key ID: B6E4A6E4A561BAF0
33 changed files with 1875 additions and 1496 deletions

View file

@ -2,7 +2,6 @@ package model
import (
"github.com/0xJacky/Nginx-UI/settings"
"github.com/gin-gonic/gin"
"github.com/golang-jwt/jwt"
"time"
)
@ -31,23 +30,6 @@ func GetUser(name string) (user Auth, err error) {
return user, err
}
func GetUserList(c *gin.Context, username interface{}) (data DataList) {
var total int64
db.Model(&Auth{}).Count(&total)
var users []Auth
result := db.Model(&Auth{}).Scopes(orderAndPaginate(c))
if username != "" {
result = result.Where("name LIKE ?", "%"+username.(string)+"%")
}
result.Find(&users)
data = GetListWithPagination(&users, c, total)
return
}
func DeleteToken(token string) error {
return db.Where("token = ?", token).Delete(&AuthToken{}).Error
}