Skip to content

Commit

Permalink
Modify logic for verifying site id
Browse files Browse the repository at this point in the history
  • Loading branch information
cYKatherine committed Aug 7, 2024
1 parent 6e0e979 commit bbc1a36
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -165,10 +165,13 @@ private void handleListAllKeysetsRelated(RoutingContext rc) {
try {
// Get value for site id
final Optional<Integer> siteIdOpt = RequestUtil.getSiteId(rc, "site_id");
if (!siteIdOpt.isPresent()) return;
if (!siteIdOpt.isPresent()) {
ResponseUtil.error(rc, 400, "must specify a site id");
return;
}
final int siteId = siteIdOpt.get();

if (siteId != Const.Data.AdvertisingTokenSiteId && !SiteUtil.isValidSiteId(siteId)) {
if (!SiteUtil.isValidSiteId(siteId)) {
ResponseUtil.error(rc, 400, "must specify a valid site id");
return;
}
Expand Down

0 comments on commit bbc1a36

Please sign in to comment.