Skip to content

Commit

Permalink
release v1.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
DongGeon0908 committed Jul 17, 2024
2 parents 364acc9 + e23d7d0 commit 38cfda6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 11 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version='1.0.2'
version='1.0.3'
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,10 @@ public void getOriginUrl(
HttpServletResponse response
) throws IOException {
log.debug("shortCode = {}", shortCode);
var originUrl = shortenerService.getOriginUrl(shortCode);
var originUrl = shortenerService.getOriginUrl(shortCode).getOriginUrl();
log.debug("originUrl = {}", originUrl);

response.sendRedirect(originUrl.getOriginUrlWithHttp());
response.sendRedirect(originUrl);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,4 @@ public class OriginUrlResponse {
public static OriginUrlResponse from(ShortUrlModel shortUrl) {
return new OriginUrlResponse(shortUrl.getOriginalUrl());
}

public String getOriginUrlWithHttp() {
if (!originUrl.startsWith("http://") && !originUrl.startsWith("https://")) {
return "http://" + originUrl;
} else {
return originUrl;
}
}
}

0 comments on commit 38cfda6

Please sign in to comment.