@controleonline/ui-common 1.2.82 → 1.2.83

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/api/index.js +31 -5
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@controleonline/ui-common",
3
- "version": "1.2.82",
3
+ "version": "1.2.83",
4
4
  "author": "ControleOnline",
5
5
  "description": "ControleOnline Common Quasar UI Component",
6
6
  "license": "MIT",
package/src/api/index.js CHANGED
@@ -391,12 +391,38 @@ export const api = {
391
391
 
392
392
  return safeUri;
393
393
  },
394
- post: async function (uri, body = {}) {
395
- const options = {
394
+ get: async function (uri, options = {}) {
395
+ return await this.fetch(uri, {
396
+ ...options,
397
+ method: 'GET',
398
+ });
399
+ },
400
+ post: async function (uri, body = {}, options = {}) {
401
+ return await this.fetch(uri, {
402
+ ...options,
396
403
  method: 'POST',
397
- body: body,
398
- };
399
- return await this.fetch(uri, options);
404
+ body,
405
+ });
406
+ },
407
+ put: async function (uri, body = {}, options = {}) {
408
+ return await this.fetch(uri, {
409
+ ...options,
410
+ method: 'PUT',
411
+ body,
412
+ });
413
+ },
414
+ patch: async function (uri, body = {}, options = {}) {
415
+ return await this.fetch(uri, {
416
+ ...options,
417
+ method: 'PATCH',
418
+ body,
419
+ });
420
+ },
421
+ delete: async function (uri, options = {}) {
422
+ return await this.fetch(uri, {
423
+ ...options,
424
+ method: 'DELETE',
425
+ });
400
426
  },
401
427
  loadSmokeIndex: async function (config = {}) {
402
428
  return await requestSmoke('/tests', {}, config);