mirror of
https://gitee.com/dromara/mayfly-go
synced 2025-12-16 04:36:35 +08:00
feat: i18n
This commit is contained in:
@@ -24,7 +24,7 @@ func (r *Resource) GetAllResourceTree(rc *req.Ctx) {
|
||||
|
||||
func (r *Resource) GetById(rc *req.Ctx) {
|
||||
res, err := r.ResourceApp.GetById(uint64(rc.PathParamInt("id")))
|
||||
biz.ErrIsNil(err, "该资源不存在")
|
||||
biz.ErrIsNil(err, "The resource does not exist")
|
||||
rc.ResData = res
|
||||
}
|
||||
|
||||
@@ -63,3 +63,10 @@ func (r *Resource) Sort(rc *req.Ctx) {
|
||||
r.ResourceApp.Sort(rc.MetaCtx, sortE)
|
||||
}
|
||||
}
|
||||
|
||||
// GetResourceRoles
|
||||
func (r *Resource) GetResourceRoles(rc *req.Ctx) {
|
||||
rrs, err := r.ResourceApp.GetResourceRoles(uint64(rc.PathParamInt("id")))
|
||||
biz.ErrIsNil(err)
|
||||
rc.ResData = rrs
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user