feat(channels): add Shangwutong connector
This commit is contained in:
@@ -16,15 +16,11 @@ const instagramAuthorizationScope = "instagram_business_basic,instagram_business
|
||||
|
||||
const tiktokAuthorizationScope = "user.info.basic,user.info.username,user.info.stats,user.info.profile,user.account.type,user.insights,message.list.read,message.list.send,message.list.manage"
|
||||
|
||||
func authorizationReturnTo(c *gin.Context) string {
|
||||
func authorizationReturnTo(c *gin.Context, bodyValue string) string {
|
||||
if value := strings.TrimSpace(c.Query("return_to")); value != "" {
|
||||
return value
|
||||
}
|
||||
var payload struct {
|
||||
ReturnTo string `json:"return_to" form:"return_to"`
|
||||
}
|
||||
_ = c.ShouldBind(&payload)
|
||||
return strings.TrimSpace(payload.ReturnTo)
|
||||
return strings.TrimSpace(bodyValue)
|
||||
}
|
||||
|
||||
// TikTokAuthorizationRequest is the DTO for initiating TikTok OAuth flow
|
||||
@@ -32,6 +28,7 @@ func authorizationReturnTo(c *gin.Context) string {
|
||||
type TikTokAuthorizationRequest struct {
|
||||
AppID string `json:"app_id"`
|
||||
AppSecret string `json:"app_secret"`
|
||||
ReturnTo string `json:"return_to"`
|
||||
}
|
||||
|
||||
func buildInstagramChatwootAuthorizationURL(accountID uint, returnTo string, appID, appSecret string) (string, error) {
|
||||
|
||||
Reference in New Issue
Block a user