fix GSI output
This commit is contained in:
@@ -190,6 +190,15 @@ handle_create_table :: proc(engine: ^dynamodb.Storage_Engine, request: ^HTTP_Req
|
||||
}
|
||||
}
|
||||
|
||||
if gsi_val, found2 := root["GlobalSecondaryIndexes"]; found2 {
|
||||
if gsi_arr, ok2 := gsi_val.(json.Array); ok2 && len(gsi_arr) > 0 {
|
||||
if _, has := gsis.?; !has {
|
||||
make_error_response(response, .ValidationException, "Invalid GlobalSecondaryIndexes definition")
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Create the table
|
||||
desc, create_err := dynamodb.create_table(engine, string(table_name), key_schema, attr_defs, gsis)
|
||||
if create_err != .None {
|
||||
|
||||
Reference in New Issue
Block a user