diff --git a/src/class/push.ts b/src/class/push.ts index 78bf164..db79b47 100644 --- a/src/class/push.ts +++ b/src/class/push.ts @@ -1,4 +1,4 @@ -import Context, { getEvent, getUserData, octokit, token } from "../index"; +import Context, { GetEvent, GetUserData, octokit, token } from "../index"; /** * @class @@ -34,7 +34,7 @@ export default class Push { * @returns {Promise} */ async function userActivity(): Promise { - const arrayActivity: getUserData = { "userData": [] }; + const arrayActivity: GetUserData = { "userData": [] }; await fetch("https://api.github.com/users/Muunatic/events/public", { method: "GET", headers: { @@ -44,7 +44,7 @@ export default class Push { } }).then((res: Response) => { return res.json(); - }).then((res: [getEvent]) => { + }).then((res: [GetEvent]) => { let i: number; for (i = 0; i < res.length; i++) { if (res[i].type === "PushEvent") { diff --git a/src/index.ts b/src/index.ts index 0e327ce..fe15c50 100644 --- a/src/index.ts +++ b/src/index.ts @@ -3,7 +3,7 @@ import { Octokit } from "octokit"; import { createAppAuth } from "@octokit/auth-app"; import { token } from "./data/config"; import { IssuesClose, IssuesComment, IssuesOpen, PRsStale, PullRequestOpen, PullRequestReview, PullRequestSynchronize, Push, WorkflowCheck } from "./structures/constant"; -import { getEvent, getUserData } from "./structures/type"; +import { GetEvent, GetUserData } from "./structures/type"; import "./structures/listener"; import dotenv from "dotenv"; dotenv.config(); @@ -114,4 +114,4 @@ setInterval(() => { export default Context; export { octokit, token }; -export type { getEvent, getUserData }; +export type { GetEvent, GetUserData }; diff --git a/src/structures/type.ts b/src/structures/type.ts index ce31806..2d466df 100644 --- a/src/structures/type.ts +++ b/src/structures/type.ts @@ -1,12 +1,12 @@ -export type getUserData = { - userData: userDataInterface[]; +export type GetUserData = { + userData: UserDataInterface[]; } -type userDataInterface = { +type UserDataInterface = { event: string; } -export type getEvent = { +export type GetEvent = { id: string; type: string;