From 5f054c49899634479549e4a4a8c8149e6f3ba4b3 Mon Sep 17 00:00:00 2001 From: Yang Luo Date: Fri, 28 Jul 2023 15:08:19 +0800 Subject: [PATCH] Fix product links --- object/product.go | 2 +- web/src/App.js | 2 +- web/src/ProductEditPage.js | 2 +- web/src/ProductListPage.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/object/product.go b/object/product.go index dd7fce78..4a29bb49 100644 --- a/object/product.go +++ b/object/product.go @@ -192,7 +192,7 @@ func BuyProduct(id string, providerName string, user *User, host string) (string } payment := Payment{ - Owner: product.Owner, + Owner: "admin", Name: paymentName, CreatedTime: util.GetCurrentTime(), DisplayName: paymentName, diff --git a/web/src/App.js b/web/src/App.js index e6c3ca55..d9282a3d 100644 --- a/web/src/App.js +++ b/web/src/App.js @@ -641,7 +641,7 @@ class App extends Component { this.renderLoginIfNotLoggedIn()} /> this.renderLoginIfNotLoggedIn()} /> this.renderLoginIfNotLoggedIn()} /> - this.renderLoginIfNotLoggedIn()} /> + this.renderLoginIfNotLoggedIn()} /> this.renderLoginIfNotLoggedIn()} /> this.renderLoginIfNotLoggedIn()} /> this.renderLoginIfNotLoggedIn()} /> diff --git a/web/src/ProductEditPage.js b/web/src/ProductEditPage.js index c2e29f63..792c7d8c 100644 --- a/web/src/ProductEditPage.js +++ b/web/src/ProductEditPage.js @@ -295,7 +295,7 @@ class ProductEditPage extends React.Component { } renderPreview() { - const buyUrl = `/products/${this.state.product.name}/buy`; + const buyUrl = `/products/${this.state.product.owner}/${this.state.product.name}/buy`; return ( diff --git a/web/src/ProductListPage.js b/web/src/ProductListPage.js index 9966bb7b..e1c9c792 100644 --- a/web/src/ProductListPage.js +++ b/web/src/ProductListPage.js @@ -247,7 +247,7 @@ class ProductListPage extends BaseListPage { render: (text, record, index) => { return (
- +