]> Untitled Git - lemmy.git/blobdiff - api_tests/src/shared.ts
Fix federation of community removal/deletion, added docs (#125)
[lemmy.git] / api_tests / src / shared.ts
index 6aa5cfc4e3a2504651ca90dea269d1eaee1d0826..3c9cc5d86d34e82534d03259c76b88301dbca319 100644 (file)
@@ -20,6 +20,7 @@ import {
   RemoveCommentForm,
   SearchForm,
   CommentResponse,
+  GetCommunityForm,
   CommunityForm,
   DeleteCommunityForm,
   RemoveCommunityForm,
@@ -402,6 +403,16 @@ export async function createCommunity(
   return api.client.createCommunity(form);
 }
 
+export async function getCommunity(
+  api: API,
+  id: number,
+): Promise<CommunityResponse> {
+  let form: GetCommunityForm = {
+    id,
+  };
+  return api.client.getCommunity(form);
+}
+
 export async function deleteCommunity(
   api: API,
   deleted: boolean,