fix(be/users): add quota and usedSpace to self api
This commit is contained in:
parent
8ccb194fea
commit
93d946e535
3 changed files with 15 additions and 7 deletions
|
@ -560,10 +560,11 @@ func (h *MultiUsersSvc) isValidRole(role string) error {
|
|||
}
|
||||
|
||||
type SelfResp struct {
|
||||
ID string `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Role string `json:"role"`
|
||||
UsedSpace int64 `json:"usedSpace,string"`
|
||||
ID string `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Role string `json:"role"`
|
||||
Quota *userstore.Quota `json:"quota"`
|
||||
UsedSpace int64 `json:"usedSpace,string"`
|
||||
}
|
||||
|
||||
func (h *MultiUsersSvc) Self(c *gin.Context) {
|
||||
|
@ -583,6 +584,7 @@ func (h *MultiUsersSvc) Self(c *gin.Context) {
|
|||
ID: claims[q.UserIDParam],
|
||||
Name: claims[q.UserParam],
|
||||
Role: claims[q.RoleParam],
|
||||
Quota: user.Quota,
|
||||
UsedSpace: user.UsedSpace,
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue