mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-03 12:30:19 +08:00
feat: expose email and sms APIs as services to SDK (#202)
Signed-off-by: Kininaru <shiftregister233@outlook.com> invalid receivers
This commit is contained in:
@ -33,9 +33,8 @@ type Object struct {
|
||||
}
|
||||
|
||||
func getUsernameByClientIdSecret(ctx *context.Context) string {
|
||||
requestUri := ctx.Request.RequestURI
|
||||
clientId := parseQuery(requestUri, "clientId")
|
||||
clientSecret := parseQuery(requestUri, "clientSecret")
|
||||
clientId := ctx.Input.Query("clientId")
|
||||
clientSecret := ctx.Input.Query("clientSecret")
|
||||
if len(clientId) == 0 || len(clientSecret) == 0 {
|
||||
return ""
|
||||
}
|
||||
|
@ -95,5 +95,8 @@ func initAPI() {
|
||||
|
||||
beego.Router("/api/get-records", &controllers.ApiController{}, "GET:GetRecords")
|
||||
beego.Router("/api/get-records-filter", &controllers.ApiController{}, "POST:GetRecordsByFilter")
|
||||
|
||||
beego.Router("/api/send-email", &controllers.ApiController{}, "POST:SendEmail")
|
||||
beego.Router("/api/send-sms", &controllers.ApiController{}, "POST:SendSms")
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user