瀏覽代碼

fix(api): put plain token into activation response

Peter Thomassen 5 年之前
父節點
當前提交
1fb7ef6462
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      api/desecapi/views.py

+ 2 - 2
api/desecapi/views.py

@@ -616,9 +616,9 @@ class AuthenticatedActivateUserActionView(AuthenticatedActionView):
             return redirect(f'/app/dynsetup/{domain.name}/#{token.plain}')
             return redirect(f'/app/dynsetup/{domain.name}/#{token.plain}')
         else:
         else:
             return Response({
             return Response({
-                'detail': 'Success! Here is the password ("auth_token") to configure your router (or any other dynDNS '
+                'detail': 'Success! Here is the password ("token") to configure your router (or any other dynDNS '
                           'client). This password is different from your account password for security reasons.',
                           'client). This password is different from your account password for security reasons.',
-                **serializers.TokenSerializer(token).data,
+                **serializers.TokenSerializer(token, include_plain=True).data,
             })
             })
 
 
     def _finalize_with_domain(self):
     def _finalize_with_domain(self):