mirror of
https://github.com/nezhahq/nezha.git
synced 2025-01-22 20:58:14 -05:00
Compare commits
5 Commits
7c8ac7ae5a
...
4952151281
Author | SHA1 | Date | |
---|---|---|---|
|
4952151281 | ||
|
a9768aaa0b | ||
|
b288d10f48 | ||
|
7540e80f20 | ||
|
3c6dc2c87e |
@ -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/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/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/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/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/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>
|
<a href="https://github.com/colour93" title="玖叁"><img src="https://avatars.githubusercontent.com/u/64313711?v=4" width="50;" alt="玖叁"/></a>
|
||||||
|
@ -133,7 +133,7 @@ func routers(r *gin.Engine, frontendDist fs.FS) {
|
|||||||
auth.POST("/batch-delete/waf", adminHandler(batchDeleteBlockedAddress))
|
auth.POST("/batch-delete/waf", adminHandler(batchDeleteBlockedAddress))
|
||||||
|
|
||||||
auth.GET("/online-user", pCommonHandler(listOnlineUser))
|
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))
|
auth.PATCH("/setting", adminHandler(updateConfig))
|
||||||
|
|
||||||
|
@ -202,7 +202,7 @@ func listOnlineUser(c *gin.Context) (*model.Value[[]*model.OnlineUser], error) {
|
|||||||
// @Param request body []string true "block list"
|
// @Param request body []string true "block list"
|
||||||
// @Produce json
|
// @Produce json
|
||||||
// @Success 200 {object} model.CommonResponse[any]
|
// @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) {
|
func batchBlockOnlineUser(c *gin.Context) (any, error) {
|
||||||
var list []string
|
var list []string
|
||||||
if err := c.ShouldBindJSON(&list); err != nil {
|
if err := c.ShouldBindJSON(&list); err != nil {
|
||||||
|
@ -18,10 +18,8 @@ type Common struct {
|
|||||||
ID uint64 `gorm:"primaryKey" json:"id,omitempty"`
|
ID uint64 `gorm:"primaryKey" json:"id,omitempty"`
|
||||||
CreatedAt time.Time `gorm:"index;<-:create" json:"created_at,omitempty"`
|
CreatedAt time.Time `gorm:"index;<-:create" json:"created_at,omitempty"`
|
||||||
UpdatedAt time.Time `gorm:"autoUpdateTime" json:"updated_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 {
|
func (c *Common) GetID() uint64 {
|
||||||
|
@ -2,17 +2,17 @@
|
|||||||
name: "OfficialAdmin"
|
name: "OfficialAdmin"
|
||||||
repository: "https://github.com/nezhahq/admin-frontend"
|
repository: "https://github.com/nezhahq/admin-frontend"
|
||||||
author: "nezhahq"
|
author: "nezhahq"
|
||||||
version: "v1.2.3"
|
version: "v1.4.0"
|
||||||
isadmin: true
|
isadmin: true
|
||||||
isofficial: true
|
isofficial: true
|
||||||
- path: "user-dist"
|
- path: "user-dist"
|
||||||
name: "Official"
|
name: "Official"
|
||||||
repository: "https://github.com/hamster1963/nezha-dash-v1"
|
repository: "https://github.com/hamster1963/nezha-dash-v1"
|
||||||
author: "hamster1963"
|
author: "hamster1963"
|
||||||
version: "v1.7.6"
|
version: "v1.7.8"
|
||||||
isofficial: true
|
isofficial: true
|
||||||
- path: "nazhua-dist"
|
- path: "nazhua-dist"
|
||||||
name: "Nazhua"
|
name: "Nazhua"
|
||||||
repository: "https://github.com/hi2shark/nazhua"
|
repository: "https://github.com/hi2shark/nazhua"
|
||||||
author: "hi2hi"
|
author: "hi2hi"
|
||||||
version: "v0.4.23"
|
version: "v0.4.24"
|
||||||
|
Loading…
Reference in New Issue
Block a user