mirror of https://github.com/veypi/OneAuth.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
543 B
Go
23 lines
543 B
Go
//
|
|
// Copyright (C) 2024 veypi <i@veypi.com>
|
|
// 2025-03-04 16:08:06
|
|
// Distributed under terms of the MIT license.
|
|
//
|
|
|
|
package settings
|
|
|
|
import (
|
|
"github.com/veypi/vbase/auth"
|
|
"github.com/veypi/vigo"
|
|
)
|
|
|
|
var Router = vigo.NewRouter()
|
|
|
|
func init() {
|
|
// 获取设置列表(支持按分类过滤)
|
|
// 只有拥有所有权限的可以修改配置表
|
|
Router.Get("/", "获取设置列表", auth.VBaseAuth.PermRead("setting"), list)
|
|
// 批量更新设置
|
|
Router.Put("/", "批量更新设置", auth.VBaseAuth.PermWrite("setting"), update)
|
|
}
|