feat: add default privileges for new user
This commit is contained in:
parent
39aa4162e2
commit
c1e17fe655
BIN
app
BIN
app
Binary file not shown.
@ -111,6 +111,16 @@ func (h *Handlers) AmoSaveToken(w http.ResponseWriter, r *http.Request) {
|
||||
Subdomain: accountAmo.Subdomain,
|
||||
ExpiresIn: token.Expiry,
|
||||
TokenType: token.TokenType,
|
||||
Privileges: map[string]model.ShortPrivilige{
|
||||
model.PrivilegeTemplateCount: model.ShortPrivilige{
|
||||
Amount: model.BasicAmountPrivilegeTemplateCount,
|
||||
CreatedAt: time.Now(),
|
||||
},
|
||||
model.PrivilegeTemplateStorage: model.ShortPrivilige{
|
||||
Amount: model.BasicAmountPrivilegeTemplateStorage,
|
||||
CreatedAt: time.Now(),
|
||||
},
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
h.reportError(w, http.StatusInternalServerError, err)
|
||||
|
Loading…
Reference in New Issue
Block a user