Skip to content

Commit

Permalink
yona-projects#401 token 값 체크 방법 변경 (StringUtils 사용)
Browse files Browse the repository at this point in the history
  • Loading branch information
hongwonjun committed Nov 20, 2019
1 parent 852f5ff commit 23a3634
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/models/Webhook.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import models.resource.Resource;
import models.resource.ResourceConvertible;
import org.eclipse.jgit.revwalk.RevCommit;
import org.apache.commons.lang3.StringUtils;
import play.Logger;
import play.api.i18n.Lang;
import play.data.validation.Constraints.Required;
Expand Down Expand Up @@ -155,7 +156,7 @@ public static Webhook findByIds(Long webhookId, Long projectId) {
private void sendRequest(String payload) {
try {
WSRequestHolder requestHolder = WS.url(this.payloadUrl);
if (this.secret != null && !this.secret.equals("")) {
if (StringUtils.isNotBlank(this.secret)) {
requestHolder.setHeader("Authorization", "token " + this.secret);
}
requestHolder
Expand Down

0 comments on commit 23a3634

Please sign in to comment.