mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2025-11-07 02:20:24 +08:00
管理界面可以切换风格
This commit is contained in:
@@ -298,6 +298,7 @@ func (this *AdminService) FindAllAdminModules(ctx context.Context, req *pb.FindA
|
||||
AdminId: int64(admin.Id),
|
||||
IsSuper: admin.IsSuper == 1,
|
||||
Fullname: admin.Fullname,
|
||||
Theme: admin.Theme,
|
||||
Modules: pbModules,
|
||||
}
|
||||
result = append(result, list)
|
||||
@@ -633,3 +634,17 @@ func (this *AdminService) ComposeAdminDashboard(ctx context.Context, req *pb.Com
|
||||
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
// UpdateAdminTheme 修改管理员使用的界面风格
|
||||
func (this *AdminService) UpdateAdminTheme(ctx context.Context, req *pb.UpdateAdminThemeRequest) (*pb.RPCSuccess, error) {
|
||||
_, err := this.ValidateAdmin(ctx, req.AdminId)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
var tx = this.NullTx()
|
||||
err = models.SharedAdminDAO.UpdateAdminTheme(tx, req.AdminId, req.Theme)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return this.Success()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user