mirror of
https://github.com/casdoor/casdoor.git
synced 2025-05-23 02:35:49 +08:00
Improve fastAutoSignin()
This commit is contained in:
parent
ade9de8256
commit
2398e69012
@ -54,7 +54,7 @@ type Payment struct {
|
|||||||
// Order Info
|
// Order Info
|
||||||
OutOrderId string `xorm:"varchar(100)" json:"outOrderId"`
|
OutOrderId string `xorm:"varchar(100)" json:"outOrderId"`
|
||||||
PayUrl string `xorm:"varchar(2000)" json:"payUrl"`
|
PayUrl string `xorm:"varchar(2000)" json:"payUrl"`
|
||||||
SuccessUrl string `xorm:"varchar(2000)" json:"successUrl""` // `successUrl` is redirected from `payUrl` after pay success
|
SuccessUrl string `xorm:"varchar(2000)" json:"successUrl"` // `successUrl` is redirected from `payUrl` after pay success
|
||||||
State pp.PaymentState `xorm:"varchar(100)" json:"state"`
|
State pp.PaymentState `xorm:"varchar(100)" json:"state"`
|
||||||
Message string `xorm:"varchar(2000)" json:"message"`
|
Message string `xorm:"varchar(2000)" json:"message"`
|
||||||
}
|
}
|
||||||
|
@ -83,7 +83,11 @@ func fastAutoSignin(ctx *context.Context) (string, error) {
|
|||||||
return "", fmt.Errorf(code.Message)
|
return "", fmt.Errorf(code.Message)
|
||||||
}
|
}
|
||||||
|
|
||||||
res := fmt.Sprintf("%s?code=%s&state=%s", redirectUri, code.Code, state)
|
sep := "?"
|
||||||
|
if strings.Contains(redirectUri, "?") {
|
||||||
|
sep = "&"
|
||||||
|
}
|
||||||
|
res := fmt.Sprintf("%s%scode=%s&state=%s", redirectUri, sep, code.Code, state)
|
||||||
return res, nil
|
return res, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user