From 403cbfdb2b9c8b08479cf26c56be90128d968de9 Mon Sep 17 00:00:00 2001 From: satikaj <117552851+satikaj@users.noreply.github.com> Date: Sat, 13 Apr 2024 21:58:27 +1000 Subject: [PATCH] fix: enable authentication for Numbas --- app/api/numbas_api.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/api/numbas_api.rb b/app/api/numbas_api.rb index e422afac8..cb7abffee 100644 --- a/app/api/numbas_api.rb +++ b/app/api/numbas_api.rb @@ -53,7 +53,7 @@ def stream_file_from_zip(zip_path, file_path) params do requires :task_def_id, type: Integer, desc: 'Task Definition ID to get Numbas test data for' end - get '/numbas_api/:task_def_id/*file_path' do + get '/numbas_api/:task_def_id/:auth_token/:username/*file_path' do env['api.format'] = :txt task_def = TaskDefinition.find(params[:task_def_id]) if task_def.has_numbas_data?