Skip to content
This repository has been archived by the owner on Jun 14, 2024. It is now read-only.

Commit

Permalink
remove return type
Browse files Browse the repository at this point in the history
  • Loading branch information
fisherjacobc committed Apr 17, 2022
1 parent becb312 commit 590ae94
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/request.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ const axios = require('axios').default;
/**
* Do a `GET` request to an API, usually roblox.
* @param {import('../typings/index').RequestOptions} options The request options.
* @returns {Promise<any>}
* @example
* request.get(...options);
*/
Expand Down Expand Up @@ -42,7 +41,6 @@ exports.get = async (options) => {
/**
* Do a `POST` request to an API, usually roblox.
* @param {import('../typings/index').RequestOptions} options The request options.
* @returns {Promise<any>}
* @example
* request.get(...options);
*/
Expand Down Expand Up @@ -99,7 +97,7 @@ exports.get = async (options) => {
});

if (options.silenceErr) {
return await axios.patch(options.url, JSON.stringify(options.body) || {}, {
return await axios.patch(options.url, options.body || {}, {
method: "PATCH",
withCredentials: true,
headers: finalHeaders,
Expand All @@ -109,7 +107,7 @@ exports.get = async (options) => {
return {code: res.status, headers: res.headers, data: res.data};
});
} else {
return await axios.patch(options.url, JSON.stringify(options.body) || {}, {
return await axios.patch(options.url, options.body || {}, {
method: "PATCH",
withCredentials: true,
headers: finalHeaders,
Expand Down

0 comments on commit 590ae94

Please sign in to comment.