@@ -5,6 +5,7 @@ export function api_fetch(
55 { schema, params } ,
66 { request_error_function, response_function, response_error_function } = { } ,
77) {
8+ // console.log("api_fetch", schema.route, schema.methods)
89 const errors_store = use_errors_store ( )
910 const geode_store = use_geode_store ( )
1011
@@ -26,9 +27,19 @@ export function api_fetch(
2627 throw new Error ( schema . $id . concat ( ": " , ajv . errorsText ( ) ) )
2728 }
2829 geode_store . start_request ( )
29- const indexOf = schema [ "methods" ] . indexOf ( "OPTIONS" )
30- const splice = schema [ "methods" ] . splice ( indexOf , 1 )
30+ var methods = [ ]
31+ for ( const method of schema . methods ) {
32+ console . log ( "method" , method )
33+ methods . push ( method )
34+ }
35+ console . log ( "methods" , methods )
36+
37+ const indexOf = methods . indexOf ( "OPTIONS" )
38+ // console.log("indexOf", indexOf)
39+ const splice = methods . splice ( indexOf , 1 )
40+ // console.log("splice", splice)
3141 const method = splice [ 0 ]
42+ // console.log("splice", splice)
3243
3344 const request_options = {
3445 method : method ,
0 commit comments