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:
Kininaru
2021-07-30 14:15:10 +08:00
committed by GitHub
parent 512a451800
commit 7a2230f63e
5 changed files with 187 additions and 5 deletions

View File

@ -142,6 +142,19 @@ func GetApplicationByClientId(clientId string) *Application {
}
}
func GetApplicationByClientIdAndSecret(clientId, clientSecret string) *Application {
if util.IsStrsEmpty(clientId, clientSecret) {
return nil
}
app := GetApplicationByClientId(clientId)
if app == nil || app.ClientSecret != clientSecret {
return nil
}
return app
}
func GetApplication(id string) *Application {
owner, name := util.GetOwnerAndNameFromId(id)
return getApplication(owner, name)