This is an automated email from the ASF dual-hosted git repository.
zixuan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar-manager.git
The following commit(s) were added to refs/heads/master by this push:
new 3570983 Fix create topic failure for non-partitioned topic (#504)
3570983 is described below
commit 3570983be4a5053ac29c2a45ba5c0d09e6f93820
Author: Apurva007 <[email protected]>
AuthorDate: Thu Dec 29 22:23:18 2022 -0800
Fix create topic failure for non-partitioned topic (#504)
Co-authored-by: Apurva Telang <[email protected]>
---
front-end/src/api/topics.js | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/front-end/src/api/topics.js b/front-end/src/api/topics.js
index daf9946..d1b70c3 100644
--- a/front-end/src/api/topics.js
+++ b/front-end/src/api/topics.js
@@ -81,14 +81,14 @@ export function fetchPartitionTopicStats(persistent,
tenantNamespaceTopic, perPa
export function putTopic(persistent, tenant, namespace, topic, data) {
var url = `/${persistent}/${tenant}/${namespace}/${topic}`
if (data > 0) {
- url += '/partitions'
+ return putTopicByPartition(persistent, tenant, namespace, topic, data)
+ } else {
+ return request({
+ headers: {'Content-Type': 'application/json'},
+ url: BASE_URL_V2 + url,
+ method: 'put'
+ })
}
- return request({
- headers: { 'Content-Type': 'application/json' },
- url: BASE_URL_V2 + url,
- method: 'put',
- data
- })
}
export function putTopicByPartition(persistent, tenant, namespace, topic,
data) {