fix account paths comments
This commit is contained in:
@@ -16,7 +16,7 @@ import (
|
|||||||
"ruben/inventory2/internal/server/sse"
|
"ruben/inventory2/internal/server/sse"
|
||||||
)
|
)
|
||||||
|
|
||||||
// TODO: use the auth middleware better?
|
// TODO: replace the redirects with 201s
|
||||||
|
|
||||||
type accountSubrouter struct {
|
type accountSubrouter struct {
|
||||||
log *logging.Logger
|
log *logging.Logger
|
||||||
@@ -44,7 +44,7 @@ func Routes(
|
|||||||
draftListings.DELETE("/:orderIndex", response.Handler(as.deleteSyncGroupListingDraft))
|
draftListings.DELETE("/:orderIndex", response.Handler(as.deleteSyncGroupListingDraft))
|
||||||
}
|
}
|
||||||
|
|
||||||
// POST /api/accounts
|
// POST /
|
||||||
func (s *accountSubrouter) createAccount(c *gin.Context) (response.Response, error) {
|
func (s *accountSubrouter) createAccount(c *gin.Context) (response.Response, error) {
|
||||||
r := c.Request
|
r := c.Request
|
||||||
ctx := r.Context()
|
ctx := r.Context()
|
||||||
@@ -67,7 +67,7 @@ func (s *accountSubrouter) createAccount(c *gin.Context) (response.Response, err
|
|||||||
return response.SeeOther(fmt.Sprintf("/api/accounts/%d", acct.AccountID)), nil
|
return response.SeeOther(fmt.Sprintf("/api/accounts/%d", acct.AccountID)), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// POST /api/accounts/{acctID}/inventory/sync-groups/draft/listings
|
// POST /:acctID/inventory/sync-groups/draft/listings
|
||||||
func (s *accountSubrouter) createSyncGroupListingDraft(c *gin.Context) (response.Response, error) {
|
func (s *accountSubrouter) createSyncGroupListingDraft(c *gin.Context) (response.Response, error) {
|
||||||
r := c.Request
|
r := c.Request
|
||||||
ctx := r.Context()
|
ctx := r.Context()
|
||||||
@@ -83,7 +83,7 @@ func (s *accountSubrouter) createSyncGroupListingDraft(c *gin.Context) (response
|
|||||||
), nil
|
), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// PUT /api/accounts/{acctID}/inventory/sync-groups/draft/listings/{orderIndex}/shop
|
// PUT /:acctID/inventory/sync-groups/draft/listings/{orderIndex}/shop
|
||||||
// @platform string
|
// @platform string
|
||||||
// @shopID string
|
// @shopID string
|
||||||
func (s *accountSubrouter) setShopInSyncGroupListingDraft(c *gin.Context) (response.Response, error) {
|
func (s *accountSubrouter) setShopInSyncGroupListingDraft(c *gin.Context) (response.Response, error) {
|
||||||
@@ -119,7 +119,7 @@ func (s *accountSubrouter) setShopInSyncGroupListingDraft(c *gin.Context) (respo
|
|||||||
), nil
|
), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// PUT /api/accounts/{acctID}/inventory/sync-groups/draft/listings/{orderIndex}/listing
|
// PUT /:acctID/inventory/sync-groups/draft/listings/{orderIndex}/listing
|
||||||
func (s *accountSubrouter) setListingInSyncGroupListingDraft(c *gin.Context) (response.Response, error) {
|
func (s *accountSubrouter) setListingInSyncGroupListingDraft(c *gin.Context) (response.Response, error) {
|
||||||
r := c.Request
|
r := c.Request
|
||||||
ctx := r.Context()
|
ctx := r.Context()
|
||||||
@@ -146,7 +146,7 @@ func (s *accountSubrouter) setListingInSyncGroupListingDraft(c *gin.Context) (re
|
|||||||
), nil
|
), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// DELETE /api/accounts/{acctID}/inventory/sync-groups/draft/listings/{orderIndex}
|
// DELETE /:acctID/inventory/sync-groups/draft/listings/{orderIndex}
|
||||||
func (s *accountSubrouter) deleteSyncGroupListingDraft(c *gin.Context) (response.Response, error) {
|
func (s *accountSubrouter) deleteSyncGroupListingDraft(c *gin.Context) (response.Response, error) {
|
||||||
r := c.Request
|
r := c.Request
|
||||||
ctx := r.Context()
|
ctx := r.Context()
|
||||||
@@ -167,7 +167,7 @@ func (s *accountSubrouter) deleteSyncGroupListingDraft(c *gin.Context) (response
|
|||||||
), nil
|
), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// POST /api/accounts/{acctID}/inventory/sync-groups
|
// POST /:acctID/inventory/sync-groups
|
||||||
func (s *accountSubrouter) saveNewSyncGroup(c *gin.Context) (response.Response, error) {
|
func (s *accountSubrouter) saveNewSyncGroup(c *gin.Context) (response.Response, error) {
|
||||||
r := c.Request
|
r := c.Request
|
||||||
ctx := r.Context()
|
ctx := r.Context()
|
||||||
|
|||||||
Reference in New Issue
Block a user