fix create account link; more dev data
This commit is contained in:
@@ -287,10 +287,7 @@ func (db *Store) GetUserAndAccountByAccessToken(ctx context.Context, accessToken
|
|||||||
|
|
||||||
func (db *Store) GetShops(ctx context.Context, acctID int64) ([]AccountShop, error) {
|
func (db *Store) GetShops(ctx context.Context, acctID int64) ([]AccountShop, error) {
|
||||||
var shops []AccountShop
|
var shops []AccountShop
|
||||||
for _, v := range devShops {
|
for _, v := range getDevShops(acctID) {
|
||||||
if v.AccountID != acctID {
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
shops = append(shops, v)
|
shops = append(shops, v)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -299,10 +296,7 @@ func (db *Store) GetShops(ctx context.Context, acctID int64) ([]AccountShop, err
|
|||||||
|
|
||||||
func (db *Store) GetListingsForShop(ctx context.Context, acctID int64, platform Platform, shopID string) ([]Listing, error) {
|
func (db *Store) GetListingsForShop(ctx context.Context, acctID int64, platform Platform, shopID string) ([]Listing, error) {
|
||||||
var vs []Listing
|
var vs []Listing
|
||||||
for _, v := range devListings {
|
for _, v := range getDevListings(acctID) {
|
||||||
if v.AccountID != acctID {
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
if v.Platform != platform {
|
if v.Platform != platform {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
package accounts
|
package accounts
|
||||||
|
|
||||||
var (
|
func getDevShops(acctID int64) []AccountShop {
|
||||||
devShops = []AccountShop{
|
return []AccountShop{
|
||||||
AccountShop{
|
AccountShop{
|
||||||
AccountShopIDs: AccountShopIDs{
|
AccountShopIDs: AccountShopIDs{
|
||||||
AccountIDs: AccountIDs{
|
AccountIDs: AccountIDs{
|
||||||
AccountID: 6,
|
AccountID: acctID,
|
||||||
},
|
},
|
||||||
Platform: Etsy,
|
Platform: Etsy,
|
||||||
ShopID: "2",
|
ShopID: "2",
|
||||||
@@ -15,7 +15,7 @@ var (
|
|||||||
AccountShop{
|
AccountShop{
|
||||||
AccountShopIDs: AccountShopIDs{
|
AccountShopIDs: AccountShopIDs{
|
||||||
AccountIDs: AccountIDs{
|
AccountIDs: AccountIDs{
|
||||||
AccountID: 6,
|
AccountID: acctID,
|
||||||
},
|
},
|
||||||
Platform: Etsy,
|
Platform: Etsy,
|
||||||
ShopID: "5",
|
ShopID: "5",
|
||||||
@@ -25,7 +25,7 @@ var (
|
|||||||
AccountShop{
|
AccountShop{
|
||||||
AccountShopIDs: AccountShopIDs{
|
AccountShopIDs: AccountShopIDs{
|
||||||
AccountIDs: AccountIDs{
|
AccountIDs: AccountIDs{
|
||||||
AccountID: 6,
|
AccountID: acctID,
|
||||||
},
|
},
|
||||||
Platform: Etsy,
|
Platform: Etsy,
|
||||||
ShopID: "8",
|
ShopID: "8",
|
||||||
@@ -35,7 +35,7 @@ var (
|
|||||||
AccountShop{
|
AccountShop{
|
||||||
AccountShopIDs: AccountShopIDs{
|
AccountShopIDs: AccountShopIDs{
|
||||||
AccountIDs: AccountIDs{
|
AccountIDs: AccountIDs{
|
||||||
AccountID: 6,
|
AccountID: acctID,
|
||||||
},
|
},
|
||||||
Platform: Tiktok,
|
Platform: Tiktok,
|
||||||
ShopID: "11",
|
ShopID: "11",
|
||||||
@@ -45,7 +45,7 @@ var (
|
|||||||
AccountShop{
|
AccountShop{
|
||||||
AccountShopIDs: AccountShopIDs{
|
AccountShopIDs: AccountShopIDs{
|
||||||
AccountIDs: AccountIDs{
|
AccountIDs: AccountIDs{
|
||||||
AccountID: 6,
|
AccountID: acctID,
|
||||||
},
|
},
|
||||||
Platform: Tiktok,
|
Platform: Tiktok,
|
||||||
ShopID: "14",
|
ShopID: "14",
|
||||||
@@ -55,7 +55,7 @@ var (
|
|||||||
AccountShop{
|
AccountShop{
|
||||||
AccountShopIDs: AccountShopIDs{
|
AccountShopIDs: AccountShopIDs{
|
||||||
AccountIDs: AccountIDs{
|
AccountIDs: AccountIDs{
|
||||||
AccountID: 6,
|
AccountID: acctID,
|
||||||
},
|
},
|
||||||
Platform: Tiktok,
|
Platform: Tiktok,
|
||||||
ShopID: "17",
|
ShopID: "17",
|
||||||
@@ -65,7 +65,7 @@ var (
|
|||||||
AccountShop{
|
AccountShop{
|
||||||
AccountShopIDs: AccountShopIDs{
|
AccountShopIDs: AccountShopIDs{
|
||||||
AccountIDs: AccountIDs{
|
AccountIDs: AccountIDs{
|
||||||
AccountID: 6,
|
AccountID: acctID,
|
||||||
},
|
},
|
||||||
Platform: Wix,
|
Platform: Wix,
|
||||||
ShopID: "20",
|
ShopID: "20",
|
||||||
@@ -75,7 +75,7 @@ var (
|
|||||||
AccountShop{
|
AccountShop{
|
||||||
AccountShopIDs: AccountShopIDs{
|
AccountShopIDs: AccountShopIDs{
|
||||||
AccountIDs: AccountIDs{
|
AccountIDs: AccountIDs{
|
||||||
AccountID: 6,
|
AccountID: acctID,
|
||||||
},
|
},
|
||||||
Platform: Wix,
|
Platform: Wix,
|
||||||
ShopID: "23",
|
ShopID: "23",
|
||||||
@@ -85,7 +85,7 @@ var (
|
|||||||
AccountShop{
|
AccountShop{
|
||||||
AccountShopIDs: AccountShopIDs{
|
AccountShopIDs: AccountShopIDs{
|
||||||
AccountIDs: AccountIDs{
|
AccountIDs: AccountIDs{
|
||||||
AccountID: 6,
|
AccountID: acctID,
|
||||||
},
|
},
|
||||||
Platform: Wix,
|
Platform: Wix,
|
||||||
ShopID: "26",
|
ShopID: "26",
|
||||||
@@ -93,13 +93,15 @@ var (
|
|||||||
Name: "Wix 3",
|
Name: "Wix 3",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
devListings = []Listing{
|
func getDevListings(acctID int64) []Listing {
|
||||||
|
return []Listing{
|
||||||
{
|
{
|
||||||
AccountShopListingIDs: AccountShopListingIDs{
|
AccountShopListingIDs: AccountShopListingIDs{
|
||||||
AccountShopIDs: AccountShopIDs{
|
AccountShopIDs: AccountShopIDs{
|
||||||
AccountIDs: AccountIDs{
|
AccountIDs: AccountIDs{
|
||||||
AccountID: 6,
|
AccountID: acctID,
|
||||||
},
|
},
|
||||||
Platform: Etsy,
|
Platform: Etsy,
|
||||||
ShopID: "2",
|
ShopID: "2",
|
||||||
@@ -115,7 +117,7 @@ var (
|
|||||||
AccountShopListingIDs: AccountShopListingIDs{
|
AccountShopListingIDs: AccountShopListingIDs{
|
||||||
AccountShopIDs: AccountShopIDs{
|
AccountShopIDs: AccountShopIDs{
|
||||||
AccountIDs: AccountIDs{
|
AccountIDs: AccountIDs{
|
||||||
AccountID: 6,
|
AccountID: acctID,
|
||||||
},
|
},
|
||||||
Platform: Etsy,
|
Platform: Etsy,
|
||||||
ShopID: "2",
|
ShopID: "2",
|
||||||
@@ -131,7 +133,7 @@ var (
|
|||||||
AccountShopListingIDs: AccountShopListingIDs{
|
AccountShopListingIDs: AccountShopListingIDs{
|
||||||
AccountShopIDs: AccountShopIDs{
|
AccountShopIDs: AccountShopIDs{
|
||||||
AccountIDs: AccountIDs{
|
AccountIDs: AccountIDs{
|
||||||
AccountID: 6,
|
AccountID: acctID,
|
||||||
},
|
},
|
||||||
Platform: Etsy,
|
Platform: Etsy,
|
||||||
ShopID: "2",
|
ShopID: "2",
|
||||||
@@ -147,7 +149,7 @@ var (
|
|||||||
AccountShopListingIDs: AccountShopListingIDs{
|
AccountShopListingIDs: AccountShopListingIDs{
|
||||||
AccountShopIDs: AccountShopIDs{
|
AccountShopIDs: AccountShopIDs{
|
||||||
AccountIDs: AccountIDs{
|
AccountIDs: AccountIDs{
|
||||||
AccountID: 6,
|
AccountID: acctID,
|
||||||
},
|
},
|
||||||
Platform: Etsy,
|
Platform: Etsy,
|
||||||
ShopID: "2",
|
ShopID: "2",
|
||||||
@@ -163,7 +165,7 @@ var (
|
|||||||
AccountShopListingIDs: AccountShopListingIDs{
|
AccountShopListingIDs: AccountShopListingIDs{
|
||||||
AccountShopIDs: AccountShopIDs{
|
AccountShopIDs: AccountShopIDs{
|
||||||
AccountIDs: AccountIDs{
|
AccountIDs: AccountIDs{
|
||||||
AccountID: 6,
|
AccountID: acctID,
|
||||||
},
|
},
|
||||||
Platform: Etsy,
|
Platform: Etsy,
|
||||||
ShopID: "2",
|
ShopID: "2",
|
||||||
@@ -179,7 +181,7 @@ var (
|
|||||||
AccountShopListingIDs: AccountShopListingIDs{
|
AccountShopListingIDs: AccountShopListingIDs{
|
||||||
AccountShopIDs: AccountShopIDs{
|
AccountShopIDs: AccountShopIDs{
|
||||||
AccountIDs: AccountIDs{
|
AccountIDs: AccountIDs{
|
||||||
AccountID: 6,
|
AccountID: acctID,
|
||||||
},
|
},
|
||||||
Platform: Etsy,
|
Platform: Etsy,
|
||||||
ShopID: "2",
|
ShopID: "2",
|
||||||
@@ -195,7 +197,7 @@ var (
|
|||||||
AccountShopListingIDs: AccountShopListingIDs{
|
AccountShopListingIDs: AccountShopListingIDs{
|
||||||
AccountShopIDs: AccountShopIDs{
|
AccountShopIDs: AccountShopIDs{
|
||||||
AccountIDs: AccountIDs{
|
AccountIDs: AccountIDs{
|
||||||
AccountID: 6,
|
AccountID: acctID,
|
||||||
},
|
},
|
||||||
Platform: Etsy,
|
Platform: Etsy,
|
||||||
ShopID: "5",
|
ShopID: "5",
|
||||||
@@ -211,7 +213,7 @@ var (
|
|||||||
AccountShopListingIDs: AccountShopListingIDs{
|
AccountShopListingIDs: AccountShopListingIDs{
|
||||||
AccountShopIDs: AccountShopIDs{
|
AccountShopIDs: AccountShopIDs{
|
||||||
AccountIDs: AccountIDs{
|
AccountIDs: AccountIDs{
|
||||||
AccountID: 6,
|
AccountID: acctID,
|
||||||
},
|
},
|
||||||
Platform: Etsy,
|
Platform: Etsy,
|
||||||
ShopID: "5",
|
ShopID: "5",
|
||||||
@@ -227,7 +229,7 @@ var (
|
|||||||
AccountShopListingIDs: AccountShopListingIDs{
|
AccountShopListingIDs: AccountShopListingIDs{
|
||||||
AccountShopIDs: AccountShopIDs{
|
AccountShopIDs: AccountShopIDs{
|
||||||
AccountIDs: AccountIDs{
|
AccountIDs: AccountIDs{
|
||||||
AccountID: 6,
|
AccountID: acctID,
|
||||||
},
|
},
|
||||||
Platform: Etsy,
|
Platform: Etsy,
|
||||||
ShopID: "5",
|
ShopID: "5",
|
||||||
@@ -243,7 +245,7 @@ var (
|
|||||||
AccountShopListingIDs: AccountShopListingIDs{
|
AccountShopListingIDs: AccountShopListingIDs{
|
||||||
AccountShopIDs: AccountShopIDs{
|
AccountShopIDs: AccountShopIDs{
|
||||||
AccountIDs: AccountIDs{
|
AccountIDs: AccountIDs{
|
||||||
AccountID: 6,
|
AccountID: acctID,
|
||||||
},
|
},
|
||||||
Platform: Etsy,
|
Platform: Etsy,
|
||||||
ShopID: "5",
|
ShopID: "5",
|
||||||
@@ -259,7 +261,7 @@ var (
|
|||||||
AccountShopListingIDs: AccountShopListingIDs{
|
AccountShopListingIDs: AccountShopListingIDs{
|
||||||
AccountShopIDs: AccountShopIDs{
|
AccountShopIDs: AccountShopIDs{
|
||||||
AccountIDs: AccountIDs{
|
AccountIDs: AccountIDs{
|
||||||
AccountID: 6,
|
AccountID: acctID,
|
||||||
},
|
},
|
||||||
Platform: Etsy,
|
Platform: Etsy,
|
||||||
ShopID: "5",
|
ShopID: "5",
|
||||||
@@ -275,7 +277,7 @@ var (
|
|||||||
AccountShopListingIDs: AccountShopListingIDs{
|
AccountShopListingIDs: AccountShopListingIDs{
|
||||||
AccountShopIDs: AccountShopIDs{
|
AccountShopIDs: AccountShopIDs{
|
||||||
AccountIDs: AccountIDs{
|
AccountIDs: AccountIDs{
|
||||||
AccountID: 6,
|
AccountID: acctID,
|
||||||
},
|
},
|
||||||
Platform: Etsy,
|
Platform: Etsy,
|
||||||
ShopID: "5",
|
ShopID: "5",
|
||||||
@@ -288,4 +290,4 @@ var (
|
|||||||
Count: 62,
|
Count: 62,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
)
|
}
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
<div class="border-button border-sidebar-border bg-card text-lg text-center max-w-[50%]">
|
<div class="border-button border-sidebar-border bg-card text-lg text-center max-w-[50%]">
|
||||||
<a href="/ui/login" class="block p-[1em] font-bold">
|
<a href="/api/auth/login" hx-boost="false" class="block p-[1em] font-bold">
|
||||||
Create an Account
|
Create an Account
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user