mirror of
https://github.com/HangarMC/Hangar.git
synced 2025-02-23 15:12:52 +08:00
Add missing platform in query and add nullable as a safety
This commit is contained in:
parent
d1ff0a7de2
commit
1b7f315429
@ -178,6 +178,7 @@ public interface VersionsApiDAO {
|
|||||||
" pvd.name," +
|
" pvd.name," +
|
||||||
" pvd.required," +
|
" pvd.required," +
|
||||||
" pvd.external_url," +
|
" pvd.external_url," +
|
||||||
|
" pvd.platform," +
|
||||||
" p.owner_name pn_owner," +
|
" p.owner_name pn_owner," +
|
||||||
" p.slug pn_slug" +
|
" p.slug pn_slug" +
|
||||||
" FROM project_version_dependencies pvd" +
|
" FROM project_version_dependencies pvd" +
|
||||||
|
@ -22,7 +22,7 @@ public class PluginDependency implements Named {
|
|||||||
|
|
||||||
@JdbiConstructor
|
@JdbiConstructor
|
||||||
@JsonCreator(mode = JsonCreator.Mode.PROPERTIES)
|
@JsonCreator(mode = JsonCreator.Mode.PROPERTIES)
|
||||||
public PluginDependency(final @Nullable String name, final boolean required, @Nested("pn") final @Nullable ProjectNamespace namespace, final String externalUrl, final Platform platform) {
|
public PluginDependency(final @Nullable String name, final boolean required, @Nested("pn") final @Nullable ProjectNamespace namespace, final String externalUrl, final @Nullable Platform platform) {
|
||||||
this.name = namespace != null ? null : name;
|
this.name = namespace != null ? null : name;
|
||||||
this.required = required;
|
this.required = required;
|
||||||
this.namespace = namespace;
|
this.namespace = namespace;
|
||||||
@ -55,7 +55,7 @@ public class PluginDependency implements Named {
|
|||||||
return this.externalUrl;
|
return this.externalUrl;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Platform getPlatform(){ return this.platform; }
|
public @Nullable Platform getPlatform(){ return this.platform; }
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
|
Loading…
Reference in New Issue
Block a user