MCPcopy Create free account
hub / github.com/RealDevSquad/website-backend / fetch

Function fetch

utils/fetch.js:14–29  ·  view source on GitHub ↗
(url, method = "get", params = null, data = null, headers = null, options = null)

Source from the content-addressed store, hash-verified

12 */
13
14const fetch = async (url, method = "get", params = null, data = null, headers = null, options = null) => {
15 try {
16 const response = await axios({
17 method,
18 url,
19 params,
20 data,
21 headers,
22 ...options,
23 });
24 return response;
25 } catch (err) {
26 logger.error("Something went wrong. Please contact admin", err);
27 throw err;
28 }
29};
30
31module.exports = {
32 fetch,

Callers 15

githubAuthCallbackFunction · 0.85
verifyUserFunction · 0.85
createGroupRoleFunction · 0.85
addGroupRoleToMemberFunction · 0.85
generateInviteForUserFunction · 0.85
sendTaskUpdateFunction · 0.85
cleanDb.jsFile · 0.85
getDiscordMembersFunction · 0.85
getDiscordRolesFunction · 0.85
addRoleToUserFunction · 0.85
removeRoleFromUserFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected