1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-02 15:38:15 +00:00

[api] update the api web_get_access_token

This commit is contained in:
poetwang
2012-09-15 13:44:57 +08:00
parent fc65a6481e
commit 4dbffc6408

View File

@@ -445,9 +445,8 @@ def get_shared_link(request, repo_id, path):
def get_repo_file(request, repo_id, file_id, file_name, op):
if op == 'download':
token = gen_token()
seafserv_rpc.web_save_access_token(token, repo_id, file_id,
op, request.user.username)
token = seafserv_rpc.web_get_access_token(repo_id, file_id,
op, request.user.username)
redirect_url = gen_file_get_url(token, file_name)
response = HttpResponse(json.dumps(redirect_url), status=200,
content_type=json_content_type)