mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2025-05-12 02:45:49 +02:00
feat: change challenge method in certificate management page
This commit is contained in:
parent
002d9c22ab
commit
5b3cd981e9
33 changed files with 1875 additions and 1496 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue