Collection override endpoints
yasaricli opened this issue · comments
example:
Tatsy.Collection({
name: 'articles',
endpoints: {
async getAll() {
const list = await this.collections.articles.find({ });
return { list }
},
get(_id) {},
post(body) {},
delete(_id) {},
put(_id, body) {},
}
});
endpoints
- getAll
- get
- post
- delete
- put