Skip to content

Commit b669038

Browse files
Fixed minor bug with createStream argument type validation
1 parent 2f83c26 commit b669038

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ksqldb/ksqldb.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ class ksqldb {
228228
* @return {Promise} a promise that completes once the server response is received, and returns a response object.
229229
*/
230230
createStream(name, columnsType, topic, value_format = 'json', partitions = 1, key) {
231-
validateInputs([name, 'string', 'name', true], [columnsType, 'object', 'columnsType', true], [topic, 'string', 'topic'], [partitions, 'number', 'partitions']);
231+
validateInputs([name, 'string', 'name', true], [columnsType, 'array', 'columnsType', true], [topic, 'string', 'topic'], [partitions, 'number', 'partitions']);
232232

233233
const columnsTypeString = columnsType.reduce((result, currentType) => result + ', ' + currentType);
234234
const query = `CREATE STREAM ${name} (${columnsTypeString}) WITH (kafka_topic='${topic}', value_format='${value_format}', partitions=${partitions});`;

0 commit comments

Comments
 (0)