Skip to content

Commit

Permalink
feat: remove sms-test and add cert obj to application
Browse files Browse the repository at this point in the history
  • Loading branch information
love98ooo committed Sep 26, 2024
1 parent afd8fea commit 17d18fb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 14 deletions.
3 changes: 2 additions & 1 deletion casdoorsdk/application.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,9 @@ type Application struct {

FailedSigninLimit int `json:"failedSigninLimit"`
FailedSigninFrozenTime int `json:"failedSigninFrozenTime"`
}

CertObj *Cert `xorm:"-" json:"certObj"`
}

func (c *Client) GetApplications() ([]*Application, error) {
queryMap := map[string]string{
Expand Down
13 changes: 0 additions & 13 deletions casdoorsdk/sms_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,3 @@ func TestSms(t *testing.T) {
}

}

func TestSmsByProvider(t *testing.T) {
InitConfig(TestCasdoorEndpoint, TestClientId, TestClientSecret, TestJwtPublicKey, TestCasdoorOrganization, TestCasdoorApplication)

sms := &smsForm{
Content: "casdoor",
Receivers: []string{"+8613854673829", "+441932567890"},
}
err := SendSmsByProvider(sms.Content, "provider_casbin_sms", sms.Receivers...)
if err != nil {
t.Fatalf("Failed to send sms: %v", err)
}
}

0 comments on commit 17d18fb

Please sign in to comment.