diff options
Diffstat (limited to 'src/main/java/com/juick/www/api/apple')
-rw-r--r-- | src/main/java/com/juick/www/api/apple/AppSiteAssociation.java | 33 |
1 files changed, 5 insertions, 28 deletions
diff --git a/src/main/java/com/juick/www/api/apple/AppSiteAssociation.java b/src/main/java/com/juick/www/api/apple/AppSiteAssociation.java index c0827003..19839254 100644 --- a/src/main/java/com/juick/www/api/apple/AppSiteAssociation.java +++ b/src/main/java/com/juick/www/api/apple/AppSiteAssociation.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2020, Juick + * Copyright (C) 2008-2022, Juick * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as @@ -35,36 +35,13 @@ public class AppSiteAssociation { @GetMapping("/.well-known/apple-app-site-association") @ResponseBody public SiteAssociations appSiteAssociations() { - WebCredentials webCredentials = new WebCredentials(); - webCredentials.setApps(Collections.singletonList(appId)); - SiteAssociations siteAssociations = new SiteAssociations(); - siteAssociations.setWebcredentials(webCredentials); - return siteAssociations; + WebCredentials webCredentials = new WebCredentials(Collections.singletonList(appId)); + return new SiteAssociations(webCredentials); } - private class SiteAssociations { - private WebCredentials webcredentials; - - @JsonProperty - public WebCredentials getWebcredentials() { - return webcredentials; - } - - public void setWebcredentials(WebCredentials webcredentials) { - this.webcredentials = webcredentials; - } + private record SiteAssociations(WebCredentials webcredentials) { } - private class WebCredentials { - private List<String> apps; - - @JsonProperty - public List<String> getApps() { - return apps; - } - - public void setApps(List<String> apps) { - this.apps = apps; - } + private record WebCredentials(List<String> apps) { } } |