Skip to content
This repository has been archived by the owner on Oct 21, 2022. It is now read-only.

Commit

Permalink
v1.4.0 introduces upsertTEI with a custom patch
Browse files Browse the repository at this point in the history
  • Loading branch information
taylordowns2000 committed Dec 8, 2020
1 parent 6d9d27c commit 75241a6
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 20 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "language-dhis2",
"version": "1.3.0",
"version": "1.4.0",
"description": "DHIS2 Language Pack for OpenFn",
"main": "lib/index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion src/Adaptor.js
@@ -1,7 +1,7 @@
/** @module Adaptor */
import axios from 'axios';
import { execute as commonExecute, expandReferences } from 'language-common';
import { get, post, put, patch } from './Client';
import { get, post, put } from './Client';
import { resolve as resolveUrl } from 'url';
import { mapValues } from 'lodash/fp';

Expand Down
18 changes: 1 addition & 17 deletions src/Client.js
Expand Up @@ -35,23 +35,7 @@ export function put({ username, password, body, url, query }) {
});
});
}
export function patch({ username, password, body, url, query }) {
return new Promise((resolve, reject) => {
request
.patch(url)
.query(query)
.type('json')
.accept('json')
.auth(username, password)
.send(JSON.stringify(body))
.end((error, res) => {
if (!!error || !res.ok) {
reject(error);
}
resolve(res);
});
});
}

export function get({ username, password, query, url }) {
return new Promise((resolve, reject) => {
request
Expand Down

0 comments on commit 75241a6

Please sign in to comment.