Răsfoiți Sursa

添加语音错误提示

tanghongbin 4 ani în urmă
părinte
comite
ea25ade4b0
2 a modificat fișierele cu 3 adăugiri și 3 ștergeri
  1. 1 1
      Controller/VoicePromptController.py
  2. 2 2
      Object/ResponseObject.py

+ 1 - 1
Controller/VoicePromptController.py

@@ -57,7 +57,7 @@ class VoicePromptView(View):
         if upload_type and uid and channel:
         if upload_type and uid and channel:
             count = VoicePromptModel.objects.filter(uid=uid, channel=channel).count()
             count = VoicePromptModel.objects.filter(uid=uid, channel=channel).count()
             if count >= 3:
             if count >= 3:
-                return response.json(404)
+                return response.json(201)
 
 
             auth = oss2.Auth(OSS_STS_ACCESS_KEY, OSS_STS_ACCESS_SECRET)
             auth = oss2.Auth(OSS_STS_ACCESS_KEY, OSS_STS_ACCESS_SECRET)
             bucket = oss2.Bucket(auth, 'oss-cn-hongkong.aliyuncs.com', 'statres')
             bucket = oss2.Bucket(auth, 'oss-cn-hongkong.aliyuncs.com', 'statres')

+ 2 - 2
Object/ResponseObject.py

@@ -41,7 +41,7 @@ class ResponseObject(object):
             177: 'Update error',
             177: 'Update error',
             178: 'ADD error',
             178: 'ADD error',
             179: 'Nickname repeated',
             179: 'Nickname repeated',
-            200: 'You can only add 3 custom voice at most',
+            201: 'You can only add 3 custom voice at most',
             306: 'The link has expired!',
             306: 'The link has expired!',
             309: 'Please ReLogin! errmsg token',
             309: 'Please ReLogin! errmsg token',
             404: 'You don not have permission to access this!',
             404: 'You don not have permission to access this!',
@@ -109,7 +109,7 @@ class ResponseObject(object):
             177: '更新错误',
             177: '更新错误',
             178: '增加错误',
             178: '增加错误',
             179: '名称不能重复',
             179: '名称不能重复',
-            200: '最多只能添加3条自定义语音',
+            201: '最多只能添加3条自定义语音',
             306: '链接已超过有效期!',
             306: '链接已超过有效期!',
             309: '请重新登录!',
             309: '请重新登录!',
             404: '您没有访问的权限!',
             404: '您没有访问的权限!',