feat(integrations): expose oauth callbacks
This commit is contained in:
@@ -36,7 +36,7 @@ func (h *ShopifyIntegrationHandler) Delete(c *gin.Context) {
|
||||
response.OK(c, gin.H{"message": "Shopify integration deleted"})
|
||||
}
|
||||
|
||||
// Auth creates/updates Shopify OAuth credentials.
|
||||
// Auth returns the Shopify OAuth authorize URL.
|
||||
// POST /api/v1/accounts/:account_id/integrations/shopify/auth
|
||||
func (h *ShopifyIntegrationHandler) Auth(c *gin.Context) {
|
||||
accountID, err := parseUintParam(c, "account_id")
|
||||
@@ -51,12 +51,12 @@ func (h *ShopifyIntegrationHandler) Auth(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
hook, svcErr := h.svc.Auth(c.Request.Context(), accountID, req)
|
||||
redirect, svcErr := h.svc.BuildAuthRedirect(c.Request.Context(), accountID, req)
|
||||
if svcErr != nil {
|
||||
handleServiceError(c, svcErr)
|
||||
return
|
||||
}
|
||||
response.OK(c, hook)
|
||||
response.OK(c, redirect)
|
||||
}
|
||||
|
||||
// GetOrders retrieves Shopify orders for an account.
|
||||
|
||||
Reference in New Issue
Block a user