Compare commits

...

5 Commits

Author SHA1 Message Date
naiba
4952151281 feat: upgrade frontend
Some checks failed
Contributors / contributors (push) Waiting to run
Sync / sync-to-jihulab (push) Waiting to run
Run Tests / tests (macos) (push) Waiting to run
Run Tests / tests (ubuntu) (push) Waiting to run
Run Tests / tests (windows) (push) Waiting to run
CodeQL / Analyze (go) (push) Has been cancelled
CodeQL / Analyze (javascript) (push) Has been cancelled
2024-12-23 00:40:38 +08:00
github-actions[bot]
a9768aaa0b update contributors[no ci] 2024-12-22 23:38:43 +08:00
naiba
b288d10f48 feat: upgrade frontend 2024-12-22 23:38:18 +08:00
naiba
7540e80f20 chore: api doc 2024-12-22 23:20:49 +08:00
仓鼠
3c6dc2c87e
fix: batch-block online-user request method (#903) 2024-12-22 23:18:08 +08:00
5 changed files with 7 additions and 8 deletions

View File

@ -87,6 +87,7 @@ add your theme to [service/singleton/frontend-templates.yaml](service/singleton/
<a href="https://github.com/unclezs" title="unclezs"><img src="https://avatars.githubusercontent.com/u/42318775?v=4" width="50;" alt="unclezs"/></a>
<a href="https://github.com/ysicing" title="缘生"><img src="https://avatars.githubusercontent.com/u/8605565?v=4" width="50;" alt="缘生"/></a>
<a href="https://github.com/yanhao98" title="严浩"><img src="https://avatars.githubusercontent.com/u/37316281?v=4" width="50;" alt="严浩"/></a>
<a href="https://github.com/hamster1963" title="仓鼠"><img src="https://avatars.githubusercontent.com/u/71394853?v=4" width="50;" alt="仓鼠"/></a>
<a href="https://github.com/arkylin" title="凌"><img src="https://avatars.githubusercontent.com/u/35104502?v=4" width="50;" alt="凌"/></a>
<a href="https://github.com/yumusb" title="榆木"><img src="https://avatars.githubusercontent.com/u/43062104?v=4" width="50;" alt="榆木"/></a>
<a href="https://github.com/colour93" title="玖叁"><img src="https://avatars.githubusercontent.com/u/64313711?v=4" width="50;" alt="玖叁"/></a>

View File

@ -133,7 +133,7 @@ func routers(r *gin.Engine, frontendDist fs.FS) {
auth.POST("/batch-delete/waf", adminHandler(batchDeleteBlockedAddress))
auth.GET("/online-user", pCommonHandler(listOnlineUser))
auth.GET("/online-user/batch-block", adminHandler(batchBlockOnlineUser))
auth.POST("/online-user/batch-block", adminHandler(batchBlockOnlineUser))
auth.PATCH("/setting", adminHandler(updateConfig))

View File

@ -202,7 +202,7 @@ func listOnlineUser(c *gin.Context) (*model.Value[[]*model.OnlineUser], error) {
// @Param request body []string true "block list"
// @Produce json
// @Success 200 {object} model.CommonResponse[any]
// @Router /online-user/batch-block [patch]
// @Router /online-user/batch-block [post]
func batchBlockOnlineUser(c *gin.Context) (any, error) {
var list []string
if err := c.ShouldBindJSON(&list); err != nil {

View File

@ -18,10 +18,8 @@ type Common struct {
ID uint64 `gorm:"primaryKey" json:"id,omitempty"`
CreatedAt time.Time `gorm:"index;<-:create" json:"created_at,omitempty"`
UpdatedAt time.Time `gorm:"autoUpdateTime" json:"updated_at,omitempty"`
// Do not use soft deletion
// DeletedAt gorm.DeletedAt `gorm:"index" json:"deleted_at,omitempty"`
UserID uint64 `json:"-"`
UserID uint64 `gorm:"index;default:0" json:"-"`
}
func (c *Common) GetID() uint64 {

View File

@ -2,17 +2,17 @@
name: "OfficialAdmin"
repository: "https://github.com/nezhahq/admin-frontend"
author: "nezhahq"
version: "v1.2.3"
version: "v1.4.0"
isadmin: true
isofficial: true
- path: "user-dist"
name: "Official"
repository: "https://github.com/hamster1963/nezha-dash-v1"
author: "hamster1963"
version: "v1.7.6"
version: "v1.7.8"
isofficial: true
- path: "nazhua-dist"
name: "Nazhua"
repository: "https://github.com/hi2shark/nazhua"
author: "hi2hi"
version: "v0.4.23"
version: "v0.4.24"