From b8b92bad4c06fea97ba10bdafce8bc69e6ae7e44 Mon Sep 17 00:00:00 2001 From: Luke Carr Date: Thu, 21 May 2020 16:57:52 +0100 Subject: [PATCH] refactor: moved FunctionResponse from functions/index.ts to functions.ts --- src/{functions/response.ts => functions.ts} | 2 +- src/modules/auth/email.ts | 2 +- src/modules/core/user.ts | 2 +- src/modules/core/webservice.ts | 2 +- src/modules/index.ts | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) rename src/{functions/response.ts => functions.ts} (84%) diff --git a/src/functions/response.ts b/src/functions.ts similarity index 84% rename from src/functions/response.ts rename to src/functions.ts index 12c8a63..865b7bf 100644 --- a/src/functions/response.ts +++ b/src/functions.ts @@ -4,7 +4,7 @@ import { Response } from "got"; * The response returned by a function call * to Moodle's Web Services API. */ -export default interface FunctionResponse { +export interface FunctionResponse { /** * Returns the raw HTTP response returned * from the API call for this function. diff --git a/src/modules/auth/email.ts b/src/modules/auth/email.ts index cd1fc17..55ab3bb 100644 --- a/src/modules/auth/email.ts +++ b/src/modules/auth/email.ts @@ -1,5 +1,5 @@ import Module from ".."; -import FunctionResponse from "../../functions/response"; +import { FunctionResponse } from "../../functions"; import { Warning } from "../shared"; export interface SignUpSettingsResponse extends FunctionResponse { diff --git a/src/modules/core/user.ts b/src/modules/core/user.ts index b0260f0..461d685 100644 --- a/src/modules/core/user.ts +++ b/src/modules/core/user.ts @@ -1,5 +1,5 @@ import Module from ".."; -import FunctionResponse from "../../functions/response"; +import { FunctionResponse } from "../../functions"; import { Warning, User } from "../shared"; interface SearchCriteria { diff --git a/src/modules/core/webservice.ts b/src/modules/core/webservice.ts index 77539ed..b7c36f1 100644 --- a/src/modules/core/webservice.ts +++ b/src/modules/core/webservice.ts @@ -1,5 +1,5 @@ import Module from ".."; -import FunctionResponse from "../../functions/response"; +import { FunctionResponse } from "../../functions"; interface WebServiceFunction { /** diff --git a/src/modules/index.ts b/src/modules/index.ts index 0764efe..8631b6e 100644 --- a/src/modules/index.ts +++ b/src/modules/index.ts @@ -1,6 +1,6 @@ import qs from "qs"; import { Client } from "../client"; -import FunctionResponse from "../functions/response"; +import { FunctionResponse } from "../functions"; /** * Attempts to handle a JSON body returned by a call to Moodle's Web Services API.