mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2025-11-06 10:00:24 +08:00
优化代码
This commit is contained in:
@@ -15,7 +15,7 @@ type APIAccessTokenService struct {
|
||||
// GetAPIAccessToken 获取AccessToken
|
||||
func (this *APIAccessTokenService) GetAPIAccessToken(ctx context.Context, req *pb.GetAPIAccessTokenRequest) (*pb.GetAPIAccessTokenResponse, error) {
|
||||
if req.Type == "user" || req.Type == "admin" { // 用户或管理员
|
||||
tx := this.NullTx()
|
||||
var tx = this.NullTx()
|
||||
|
||||
accessKey, err := models.SharedUserAccessKeyDAO.FindAccessKeyWithUniqueId(tx, req.AccessKeyId)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user