fix: create_user_apikey裸用未导入的password_encode——改用get_serverenv取函数(与模块内惯例一致)
This commit is contained in:
parent
60fb6c78bc
commit
5bd81a35f3
@ -278,11 +278,12 @@ async def create_user_apikey(sor, dappid, user_id, user_orgid, **kwargs):
|
||||
|
||||
# 创建新apikey
|
||||
apikey_value = getID()
|
||||
_enc = get_serverenv('password_encode')
|
||||
ns = {
|
||||
'id': getID(),
|
||||
'dappid': dappid,
|
||||
'userid': user_id,
|
||||
'apikey': password_encode(apikey_value),
|
||||
'apikey': _enc(apikey_value),
|
||||
'enabled_date': curDateString(),
|
||||
'expired_date': '9999-12-31'
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user