mirror of
https://github.com/captbaritone/webamp.git
synced 2026-07-20 16:49:52 +00:00
Minor GraphQL fixes
This commit is contained in:
parent
1529301a84
commit
2559c887e9
3 changed files with 9 additions and 5 deletions
|
|
@ -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();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue