fix: use passed method instead of resetting it

This commit is contained in:
Karl-Philipp Wulfert
2020-01-08 16:32:24 +01:00
parent 07b8d2aabf
commit db5645732c
2 changed files with 7 additions and 3 deletions

View File

@@ -13,7 +13,7 @@
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
import {Logger} from '@openstapps/logger';
import * as request from 'request-promise-native';
import request from 'request-promise-native';
import {
AccessLevel,
Branch,
@@ -472,7 +472,7 @@ export class Api {
...options,
};
if (['DELETE', 'GET', 'POST', 'PUT'].includes(_options.method)) {
if (!['DELETE', 'GET', 'POST', 'PUT'].includes(_options.method)) {
_options.method = 'GET';
}