File tree Expand file tree Collapse file tree 1 file changed +2
-7
lines changed
src/webserver/database/sqlpage_functions Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -570,13 +570,8 @@ async fn run_sql<'a>(
570570 . await
571571 . with_context ( || format ! ( "run_sql: invalid path {sql_file_path:?}" ) ) ?;
572572 let tmp_req = if let Some ( variables) = variables {
573- let variables: ParamMap = serde_json:: from_str ( & variables) . map_err ( |err| {
574- let context = format ! (
575- "run_sql: unable to parse the variables argument (line {}, column {})" ,
576- err. line( ) ,
577- err. column( )
578- ) ;
579- anyhow:: Error :: new ( err) . context ( context)
573+ let variables: ParamMap = serde_json:: from_str ( & variables) . with_context ( || {
574+ format ! ( "run_sql(\' {sql_file_path}\' , \' {variables}\' ): the second argument should be a JSON object with string keys and values" )
580575 } ) ?;
581576 request. fork_with_variables ( variables)
582577 } else {
You can’t perform that action at this time.
0 commit comments