Make some responses from the index api more appropriate.
This commit is contained in:
parent
603ad53f6a
commit
05ccd4e793
1 changed files with 9 additions and 7 deletions
|
@ -78,10 +78,12 @@ def create_user():
|
|||
@app.route('/v1/users/', methods=['GET'])
|
||||
@process_auth
|
||||
def get_user():
|
||||
return jsonify({
|
||||
'username': get_authenticated_user().username,
|
||||
'email': get_authenticated_user().email,
|
||||
})
|
||||
if get_authenticated_user():
|
||||
return jsonify({
|
||||
'username': get_authenticated_user().username,
|
||||
'email': get_authenticated_user().email,
|
||||
})
|
||||
abort(404)
|
||||
|
||||
|
||||
@app.route('/v1/users/<username>/', methods=['PUT'])
|
||||
|
@ -219,18 +221,18 @@ def get_repository_images(namespace, repository):
|
|||
@parse_repository_name
|
||||
@generate_headers(role='write')
|
||||
def delete_repository_images(namespace, repository):
|
||||
pass
|
||||
return make_response('Not Implemented', 501)
|
||||
|
||||
|
||||
@app.route('/v1/repositories/<path:repository>/auth', methods=['PUT'])
|
||||
@parse_repository_name
|
||||
def put_repository_auth(namespace, repository):
|
||||
pass
|
||||
return make_response('Not Implemented', 501)
|
||||
|
||||
|
||||
@app.route('/v1/search', methods=['GET'])
|
||||
def get_search():
|
||||
pass
|
||||
return make_response('Not Implemented', 501)
|
||||
|
||||
|
||||
@app.route('/_ping')
|
||||
|
|
Reference in a new issue