Skip to content

Commit

Permalink
Add comments to services example
Browse files Browse the repository at this point in the history
  • Loading branch information
danlupascu committed Oct 19, 2019
1 parent ee62ab3 commit 17ab97c
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions examples/service.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
/* eslint-disable no-unused-vars */
// This is an example of a service interface and a class and a simple object.
// This is an example of a service interface as a class and a simple object.
// As a class
class MyService {
async find(params) {}
async get(id, params) {}
async create(data, params) {}
async update(id, data, params) {}
async patch(id, data, params) {}
async remove(id, params) {}
async find(params) {} // Find all data
async get(id, params) {} // Get a single entry
async create(data, params) {} // Create an entry
async update(id, data, params) {} // Update an entry by replacing it
async patch(id, data, params) {} // Update one or more entries by merging with the new data
async remove(id, params) {} // Remove an entry
}

// As an object
Expand Down

0 comments on commit 17ab97c

Please sign in to comment.