Minor GraphQL fixes

This commit is contained in:
Jordan Eldredge 2024-02-29 21:52:13 -08:00
parent 1529301a84
commit 2559c887e9
3 changed files with 9 additions and 5 deletions

View file

@ -12,6 +12,10 @@ export default class ClassicSkinResolver implements NodeResolver, ISkin {
_model: SkinModel;
__typename = "ClassicSkin";
constructor(model: SkinModel) {
this._model = model;
}
md5(): string {
return this._model.getMd5();
}

View file

@ -15,6 +15,10 @@ export default class ModernSkinResolver implements NodeResolver, ISkin {
_model: SkinModel;
__typename = "ModernSkin";
constructor(model: SkinModel) {
this._model = model;
}
md5(): string {
return this._model.getMd5();
}

View file

@ -58,11 +58,7 @@ class RootResolver extends MutationResolver {
if (skin == null) {
return null;
}
if (skin.getSkinType() === "MODERN") {
return new ModernSkinResolver(skin);
} else {
return SkinResolver.fromModel(skin);
}
return SkinResolver.fromModel(skin);
}
/**