Skip to content

Commit

Permalink
fix(words): fix the missing self
Browse files Browse the repository at this point in the history
  • Loading branch information
CapooL committed Dec 6, 2023
1 parent 3bb7f2d commit dd2a914
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions hinghwa-dict-backend/word/pronunciation/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ def combinePronunciationV2(request):

class ManagePronunciation(View):
# PN0101 获取发音信息
def get(request, id):
def get(self, request, id):
pronunciation = get_pronunciation_by_id(id)
pronunciation.views += 1
pronunciation.save()
Expand All @@ -304,7 +304,7 @@ def get(request, id):
)

# PN0103 更改发音信息
def put(request, id):
def put(self, request, id):
token_pass(request.headers, -1)
pronunciation = get_pronunciation_by_id(id)
body = demjson.decode(request.body) if len(request.body) else {}
Expand All @@ -323,7 +323,7 @@ def put(request, id):
return JsonResponse({}, status=200)

# PN0104 删除发音
def delete(request, id):
def delete(self, request, id):
token_pass(request.headers, -1)
pronunciation = get_pronunciation_by_id(id)
body = demjson.decode(request.body) if len(request.body) else {}
Expand All @@ -345,7 +345,7 @@ def delete(request, id):

class ManageApproval(View):
# PN0106 审核语音
def post(request, id):
def post(self, request, id):
token_pass(request.headers, -1)
verifier = get_request_user(request)
body = demjson.decode(request.body) if len(request.body) else {}
Expand Down Expand Up @@ -382,7 +382,7 @@ def post(request, id):
return JsonResponse(transaction_info, status=200)

# PN0105 更改审核结果
def put(request, id):
def put(self, request, id):
token_pass(request.headers, -1)
verifier = get_request_user(request)
body = demjson.decode(request.body) if len(request.body) else {}
Expand Down

0 comments on commit dd2a914

Please sign in to comment.