Skip to content
This repository was archived by the owner on May 27, 2021. It is now read-only.

Commit f80ae22

Browse files
authored
Fix tag types relation (#125)
* Fix tag types relation * The data isn't needed
1 parent 13bab86 commit f80ae22

File tree

1 file changed

+5
-11
lines changed

1 file changed

+5
-11
lines changed

src/resources/TagType.js

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,14 @@
3030
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3131
*/
3232

33-
import CrudSetBase from './base/CrudSetBase';
33+
import CrudBase from './base/CrudBase';
3434
import Tag from './Tag';
3535

3636
/**
3737
* TagType resource
3838
* @mixes CrudSetBase
3939
*/
40-
export default class TagType extends CrudSetBase {
40+
export default class TagType extends CrudBase {
4141
static get resourcePath () {
4242
return '/tags/types/{id}';
4343
}
@@ -46,17 +46,11 @@ export default class TagType extends CrudSetBase {
4646
return 'tag-types';
4747
}
4848

49-
get _Child () {
50-
return Tag;
51-
}
52-
5349
/**
54-
* Get items associated with the set
50+
* Get the list of tags that are attached to this type
5551
* @returns {SimpleResourceProxy} - A proxy for accessing the resource
5652
*/
57-
get items () {
58-
const data = { [this.constructor.foreignKeyName]: this.id };
59-
60-
return this._proxyResourceList(this._Child, `${this.url}/tags`, data);
53+
get tags () {
54+
return this._proxyResourceList(Tag, `${this.url}/tags`);
6155
}
6256
}

0 commit comments

Comments
 (0)