mirror of
https://github.com/Wei-Shaw/sub2api.git
synced 2026-09-24 16:05:44 +08:00
fix(payment): send features as string not array when creating/updating plan
This commit is contained in:
@@ -1 +1 @@
|
||||
0.1.108.45
|
||||
0.1.108.46
|
||||
|
||||
@@ -200,7 +200,7 @@ function openPlanEdit(plan: SubscriptionPlan | null) {
|
||||
async function handleSavePlan() {
|
||||
planSaving.value = true
|
||||
try {
|
||||
const features = planFeaturesText.value.split('\n').map(f => f.trim()).filter(Boolean)
|
||||
const features = planFeaturesText.value.split('\n').map(f => f.trim()).filter(Boolean).join('\n')
|
||||
const data = { ...planForm, features }
|
||||
if (editingPlan.value) { await adminPaymentAPI.updatePlan(editingPlan.value.id, data) }
|
||||
else { await adminPaymentAPI.createPlan(data) }
|
||||
|
||||
Reference in New Issue
Block a user