Skip to content
Snippets Groups Projects
Commit 62d620c4 authored by Antoine R. Dumont's avatar Antoine R. Dumont
Browse files

Refactor - Rename and unify with doc

parent fb2efe03
No related branches found
No related tags found
No related merge requests found
......@@ -364,11 +364,11 @@ def api_origin(origin_id):
return jsonify({'origin': service.lookup_origin(origin_id)})
@app.route('/api/1/release/<string:release_id>')
@app.route('/api/1/release/<string:sha1_git>')
@jsonp
def api_release(release_id):
"""Return information about origin"""
return jsonify({'release': service.lookup_release(release_id)})
def api_release(sha1_git):
"""Return information about release with id sha1_git."""
return jsonify({'release': service.lookup_release(sha1_git)})
@app.route('/api/1/browse/<string:q>/')
......
......@@ -82,11 +82,11 @@ def lookup_origin(origin_id):
return main.storage().origin_get({'id': origin_id})
def lookup_release(release_sha1):
"""Return information about the release with sha1 release_sha1.
def lookup_release(release_sha1_git):
"""Return information about the release with sha1 release_sha1_git.
Args:
release_sha1: The release's sha1 as hexadecimal
release_sha1_git: The release's sha1 as hexadecimal
Returns:
Release information as dict.
......@@ -95,7 +95,7 @@ def lookup_release(release_sha1):
ValueError if the identifier provided is not of sha1 nature.
"""
algo, hBinSha1 = query.parse_hash(release_sha1)
algo, hBinSha1 = query.parse_hash(release_sha1_git)
if algo != 'sha1': # HACK: sha1_git really but they are both sha1...
raise ValueError('Only sha1_git is supported.')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment