diff options
-rw-r--r-- | src/api/forms.ts | 25 |
1 files changed, 4 insertions, 21 deletions
diff --git a/src/api/forms.ts b/src/api/forms.ts index c20a587..724d6b7 100644 --- a/src/api/forms.ts +++ b/src/api/forms.ts @@ -1,4 +1,5 @@ import { Question, QuestionType } from "./question" +import ApiClient from "./client"; export enum FormFeatures { Discoverable = "DISCOVERABLE", @@ -16,27 +17,9 @@ export interface Form { description: string } -export function getForms(): Form[] { - return [ - { - title: "Ban Appeals", - id: "ban-appeals", - description: "Appealing bans from the Discord server", - open: true - }, - { - title: "Insights 2020", - id: "insights-2020", - description: "Insights about the Python Discord community", - open: false - }, - { - title: "Code Jam 2099 Sign Ups", - id: "code-jam-2099-sign-up", - description: "Signing up for Python Discord's millionth code jam!", - open: false - } - ] +export async function getForms(): Promise<Form[]> { + const resp = await ApiClient.get("forms/discoverable"); + return resp.data; } export function getForm(id: string): Promise<Form> { |