Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F9346264
D195.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
D195.diff
View Options
diff --git a/swh/storage/vault/api/server.py b/swh/storage/vault/api/server.py
--- a/swh/storage/vault/api/server.py
+++ b/swh/storage/vault/api/server.py
@@ -60,25 +60,22 @@
return 'SWH vault API server'
-@app.route('/vault/<cooker:type>/',
- methods=['GET'])
-def ls_directory(type):
+@app.route('/vault/<cooker:type>/', methods=['GET'])
+def vault_ls(type):
return encode_data(list(
g.cache.ls(type)
))
-@app.route('/vault/<cooker:type>/<id>/',
- methods=['GET'])
-def get_cooked_directory(type, id):
+@app.route('/vault/<cooker:type>/<id>/', methods=['GET'])
+def vault_fetch(type, id):
if not g.cache.is_cached(type, id):
abort(404)
- return encode_data(g.cache.get(type, id).decode())
+ return encode_data(g.cache.get(type, id))
-@app.route('/vault/<cooker:type>/<id>/',
- methods=['POST'])
-def cook_request_directory(type, id):
+@app.route('/vault/<cooker:type>/<id>/', methods=['POST'])
+def vault_cook(type, id):
task = get_task(cooking_task_name)
task.delay(type, id, app.config['storage'], app.config['cache'])
# Return url to get the content and 201 CREATED
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Jul 3, 3:51 PM (2 w, 3 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3214580
Attached To
D195: vault: coherent API view names
Event Timeline
Log In to Comment