diff options
author | Vitaly Takmazov | 2022-12-21 02:17:29 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2022-12-21 02:23:16 +0300 |
commit | 55293b4ac33e0f4fd2bfce3a0f5783b42812a65c (patch) | |
tree | cf5996d6036554dbc78aeb1eb19d2fe09fc998b0 /src/main/java/com/juick/www/api/apple | |
parent | e588a7ded6fae3b033e1a59a4c24d1e1a6799747 (diff) |
webfinger, app-site-associations: adopt records
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) { } } |